日期:2014-05-17  浏览次数:20653 次

请问怎么使用onclick触发器
<form   action= " <?php   echo   $file_url;   ?> "   method= "POST "   name= "subforums "   id= "isubforums ">
    <p>
        关键字
        <input   type= "text "   name= "f_keyword "   value= " "   />
    </p>
    <p>
        页码
        <input   type= "text "   name= "f_num "   value= " "   />
    </p>
    <p>
        <input   type= "submit "   name= "submit "   value= "Submit "   />
        <input   type= "button "   onclick= " "   />
        <input   type= "button "   onclick= "document.subforums.submit(); "   value= "name   submit "   />
        <input   type= "button "   onclick= "document.isubforums.submit(); "   value= "id   submit "   />
        <input   type= "button "   onclick= "this.submit(); "   value= "name   submit "   />
        <input   type= "button "   onclick= "this.submit(); "   value= "id   submit "   />
    </p>
</form>


用哪个方法都不行~~郁闷`~~

------解决方案--------------------
<input type= "button " onclick= "document.subforums.submit(); " value= "name submit " />
-->
<input type= "button " onclick= "document.all.subforums.submit(); " value= "name submit " />


<input type= "button " onclick= "document.isubforums.submit(); " value= "id submit " />
-->
<input type= "button " onclick= "document.getElementById( 'isubforums ').submit(); " value= "id submit " />
------解决方案--------------------
you can try this:

<html>
<form action= "# " method= "POST " name= "subforums " id= "isubforums ">
<p>
keywords
<input type= "text " name= "f_keyword " value= " " />
</p>
<p>
page NO.
<input type= "text " name= "f_num " value= " " />
</p>
<p>
<!-- input type= "submit " name= "submit " value= "Submit " /-->
<input type= "button " onclick= "javascript:subforums.submit() " value= "name submit " />
<input type= "button " onclick= "javascript:document.getElementById( 'isubforums ').submit(); " value= "id submit " />
</p>
</form>
</html>
------解决方案--------------------
<input type= "submit " name= "submit " value= "Submit " />

because this node above is existed, you can 't submit with another node.