一个不错的应用,用于提交获取文章内容,不推荐用
一个不错的应用,用于提交获取文章内容,不推荐用
发布时间:2016-12-30 来源:查字典编辑
摘要:复制代码代码如下:functionshowlist(vtype){with(document.listform){w_type.value=...

复制代码 代码如下:

<scriptlanguage="javascript">

functionshowlist(vtype)

{

with(document.listform)

{

w_type.value=vtype;

}

document.listform.submit();

return;

}

functionshowout(vid)

{

with(document.showform)

{

id.value=vid;

}

document.showform.submit();

return;

}

functionshowmenu(buyok,img)

{

if(buyok.style.display=="none")

{

buyok.style.display="";

img.src="images/bclass2.gif";

}else{

buyok.style.display="none";

img.src="images/bclass1.gif";

}

}

</SCRIPT>

<scriptlanguage="JavaScript">

functionpage(vpage){

document.pageform.page.value=vpage;

document.pageform.submit();

returnfalse;

}

functiontrimpos(s){

returns.replace(/(^[s]*)|([s]*$)/g,"");

}

functionisnum(tmp){

if(tmp>='0'&&tmp<='9')

returntrue;

returnfalse;

}

functionmysubmit(){

if(event.keyCode=='13')

gosubmit();

}

functiongosubmit(){

varstr=trimpos(vpos.value);

if(str==""){

alert("请输入页码!");

vpos.focus();

return;

}

for(vari=0;i<str.length;i++){

if(isnum(str.charAt(i))==false){

alert("页码必须由数字组成!");

vpos.focus();

vpos.value="";

return;

}

}

if((parseInt(str)<1)||(parseInt(str)>2)){

alert("页码超出范围!");

vpos.focus();

vpos.value="";

return;

}

page(str);

}

</script>

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新Javascript教程学习
热门Javascript教程学习
编程开发子分类