<script> <BR> function showlist(vtype) <BR> { <BR> with (document.listform) <BR> { <BR> w_type.value=vtype; <BR> } <BR> document.listform.submit(); <BR> return; <BR> } <BR> function showout(vid) <BR> { <BR> with (document.showform) <BR> { <BR> id.value=vid; <BR> } <BR> document.showform.submit(); <BR> return; <BR> } <BR>function showmenu(buyok,img) <BR>{ <BR> if(buyok.style.display=="none") <BR> { <BR> buyok.style.display=""; <BR> img.src="images/bclass2.gif"; <BR> } else { <BR> buyok.style.display="none"; <BR> img.src="images/bclass1.gif"; <BR> } <BR>} <BR></script>
<script> <BR> function page(vpage){ <BR> document.pageform.page.value=vpage; <BR> document.pageform.submit(); <BR> return false; <BR> } <br><br> function trimpos(s) { <BR> return s.replace(/(^[\s]*)|([\s]*$)/g, ""); <BR> } <br><br> function isnum( tmp ){ <BR> if ( tmp >= '0' && tmp <= '9' ) <BR> return true; <BR> return false; <BR> } <br><br> function mysubmit(){ <BR> if (event.keyCode=='13') <BR> gosubmit(); <BR> } <br><br> function gosubmit(){ <BR> var str=trimpos(vpos.value); <BR> if (str == "") { <BR> alert("请输入页码!"); <BR> vpos.focus(); <BR> return; <BR> } <BR> for ( var i=0; i < str.length; i++ ){ <BR> if(isnum( str.charAt(i)) == false){ <BR> alert("页码必须由数字组成!"); <BR> vpos.focus(); <BR> vpos.value=""; <BR> return; <BR> } <BR> } <BR> if ( ( parseInt(str)<1 ) || ( parseInt(str) > 2) ){ <BR> alert("页码超出范围!"); <BR> vpos.focus(); <BR> vpos.value=""; <BR> return; <BR> } <BR> page(str); <BR> } <br><br></script>