type="submit"
Posted rsapaper
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了type="submit"相关的知识,希望对你有一定的参考价值。
1 <?php var_dump($_REQUEST); ?> 2 <form action="" id="javascript_page"> 3 SHOP-ASIN <input type="text" name="shopasin"> 4 <button type="submit" name="whelp2017" value="whelp2017" >whelp2017-2016</button> 5 </form> 6 7 8 <div onclick="w()">w_pagination</div> 9 <script> 10 function w() { 11 document.getElementById(‘javascript_page‘).submit(); 12 } 13 </script>
<?php var_dump($_REQUEST); ?> <form action="" id="javascript_page"> SHOP-ASIN <input type="text" name="shopasin"> <input type="submit" name="whelp2017" value="whelp2017"> </form> <div onclick="w()">w_pagination</div> <script> function w() { document.getElementById(‘javascript_page‘).submit(); } </script>
//array(2) { ["shopasin"]=> string(3) "www" ["whelp2017"]=> string(9) "whelp2017" }
//array(1) { ["shopasin"]=> string(4) "w123" }
以上是关于type="submit"的主要内容,如果未能解决你的问题,请参考以下文章
input type="submit" 与按钮标签是不是可以互换? [复制]
<button type="submit"> onclick 提交两次?