日期:2014-05-16  浏览次数:20413 次

JS 防止重复多次点击按钮重复发帖

? function change(){
? if (document.myform.subaddphone.value=="添加至号码库")
?? {?
?????? document.myform.subaddphone.value="正在添加号码中";??
?????? document.myform.subaddphone.disabled=true;
?? ??? document.forms['myform'].action="addPhones.action";??????
?????? document.myform.submit();???????
?? }
?? else
?? {
???? document.myform.subaddphone.value="添加至号码库";???
?? }
}

注释:subaddphone为submit按钮的name,myform为form表单的name