<head><title> test</title></head>
<body>
<script language=javascript>
alert(<%=request.servervariables("content_length" )%>);
</script>
<%
function btnsubmit_onclick()
if request.servervariables("content_length" ) > 40 then
response.write "test > 40 " %>
<script language=javascript>
set p = document.all;
alert( p.inptbox.value);
p.namebox.value = p.inptbox.value;
</script>
<% else
response.write " test < 40 "
end if
end function
%>
<form action="test.asp" method="post">
測試姓名:
<input name=namebox />
<input name=inptbox />
<input type=submit name=btnsubmit value=提交 onclick=btnsubmit_onclick />
</form>
</body>
</html>
1.為何這段代碼沒有反應,點擊后還是兩個框都空白?
2.好象什么都不填就按提交,request.servervariables("content_length" )都會返回40,是不是每次空白網頁反回的都是40,還是看網頁內有多少信息量而定?
多謝各位指教!