Google
 
资源下载 | 发布源码资源

已解决问题
asp javs js vb我在页面里做了个 funtion 两个表单同时...
 
问题补充: <script type="text/javascript"> function checkadd(theform){ if(theform.ka.value==''){ alert('带*号内容不能为空,请检查填写内容!'); theform.ka.focus(); return false; } if(theform.kb.value==''){ alert('带*号内容不能为空,请检查填写内容!'); theform.kb.focus(); return false; } if(theform.kc.value==''){ alert('带*号内容不能为空,请检查填写内容!'); theform.kc.focus(); return false; } } return true; } </script> 表单一 可以 在用户输入空 的内容时弹出<form id="form1" name="form1" method="post" action="xxcc.asp" onsubmit="return checkadd(this);" > <input name="q13" type="text" size="20" maxlength="20" id="ka" /> <span class="STYLE5 STYLE3">*</span></td> </tr> <tr> <td align="right"><span class="STYLE27">内容:</span></td> <td> <textarea name="textarea3" cols="77" rows="9" id="kb">本人对推广本地视窗的优势。</textarea></td> </tr> <tr> <td align="right"> </td> <td <input type="submit" value="申请" name="B14" /><input type="reset" value="取消" name="B123" /></td></form> 表单二就不行了 <form id="form1" name="form1" method="post" action="xxcc.asp" onsubmit="return checkad(this);" > <div align="center"><span class="STYLE6 STYLE13">投入资金:</span><span class="STYLE13">   </span> <input name="q1" type="text" class="STYLE13" size="20" maxlength="20" id="kc"/> <input name="q2" type="radio" value="金子" checked="checked" /> 金子<input type="radio" value="银子" name="q2" /> 现金</span>          竞投管理期限: <select name="q3"> <option>三个月</option> <option>一年</option> </select><input type="submit" value="竟标" name="B15" /> <input type="reset" value="取消" name="B123" /> td></form>为什么呢? 同一个页面里的 function 不能被掉用两次?
提问者:tomore  提问时间:08-10-20 20:29  
 最佳答案
 的答案  ( 采纳时间: 70-01-01 08:00 )

 评论  回答时间: 70-01-01 08:00 
其他答案 (1)

function 里面的内容是针对第一个表单里面文本框写的,文本框的名字是ka,kb,kc,而第二个表单里面没有这3个元素,只有q1,q2,q3,这3个,所以会出现错误
0 评论  回答时间: 1224515236 


关于我们 - 广告服务 - 联系我们 - 网站声明 - Archiver - WAP - TOP
Copyright (c) 2001-2010 kkbar.com. All rights reserved.  京ICP备10020589号