html name id, 与服务器交互必须有name 在HTML中元素的ID和Name的区别和联系. 今天写了个测试,在php脚本里怎么也获取不到$_POST['userName']的值,经检查在html页面只写了input的Id,没有写Name. 现总结网上的帖子: Name Attribute Valid only on a, form, iframe, img, map, input, select, textarea Name does not have to be unique Ca
<script> window.onload = function(){ document.getElementById('form').submit(); } </script> 解决方法Make sure that there is no name="submit" or id="submit" in the form