日期:2014-05-16 浏览次数:20435 次
.....省略 </head> <script src="edit_js.js" type="text/javascript" ></script> <body> <form action="act.php" method="post" onsubmit="return submit()" > <table width="680px" border="0" align="center"> <tr> <td colspan="4" class="center toplinheight" >弹窗广告在线编辑:</td> </tr> <tr > <td width="20%">新闻标题:</td><td width="30%"><input id="newtitle" name="newtitle" type="text" value="<?=$result_new['newtitle'] ?>" /> </td> <td width="24%">新闻链接:</td> <td width="26%"><input id="relationartic" name="relationartic" type="text" value="<?=$result_new['relationartic'] ?>" /></td> </tr> <tr>.............. <td colspan="2"><input type="submit" value="确认提交" /></td> <td colspan="2"><input type="button" value="重置" /><td> </tr> </table> </form> <table> <tr><td><input type="button" value="123" onclick="onsubmit()" /></td></tr> </table> </body> </html>
function submit() { if($(newtitle).value == "" || $(relationartic).value=="" ||$(tipssep).value==""||$(blackpic).value==""||$(picflag)==""||$(friedlytips).value == "" ||$(frendly_isuse).value ==""||$(new_isuse)==""||$(frontset)==""||$(colorset).value=="") { alert("请完整填写信息!") ; return false ; } else { alert ("123") ; } } function $(str) { return "document.getElementById(str)"; }