[求助]js取值判断问题
<script language="javascript">
function setid()
{
if(!window.myform.page.value>window.myform.total.value)
myform.page.innerHTML=1;
form.page.focus()
return false;
}
</script>
<form name="myform" action="?" method="get">
<input type="hidden" name="ArticleContent" value="<%=keyword%>">
<input type="hidden" name="total" value="<%=rs.RecordCount%>">
<input type="text" name="page" value="<%=page%>" size="2" class="bt"><input type="submit" value="Go" class="bl" onClick="setid();">
</form>
function setid()
{
if(!window.myform.page.value>window.myform.total.value)
myform.page.innerHTML=1;
form.page.focus()
return false;
}
</script>
<form name="myform" action="?" method="get">
<input type="hidden" name="ArticleContent" value="<%=keyword%>">
<input type="hidden" name="total" value="<%=rs.RecordCount%>">
<input type="text" name="page" value="<%=page%>" size="2" class="bt"><input type="submit" value="Go" class="bl" onClick="setid();">
</form>
以上代码,怎样才能在点击按钮"Go"后,先通过js取得input(name=page)与input(name=total)[红色部分]的值,并判断:如果input(name=page)>input(name=total)时,<input type="text" name="page" value="<%=page%>" size="2" class="bt">自动填写"1".然后执行<form>
谢谢!!