<script>
 window.onload = login;
 function login(){
  document.getElementById("username").value = '<?php  echo $_COOKIE["username"]; ?>';
  document.getElementById("password").value = '<?php  echo $_COOKIE["password"]; ?>';
  document.getElementById("loginForm").submit();
 }
</script>

 <form />
</form>

=======================================

JS 方法中的 submit() 不执行  页面没有跳转。

在群里 网友 帮我解答了。  很感谢。

<input name="submit" ,按钮的名字不要取成关键字
你调用submit()的时候,JS不会执行,因为有的名字叫submit

相关文章:

  • 2022-12-23
  • 2021-11-27
  • 2021-11-27
  • 2021-11-27
  • 2021-12-02
  • 2022-01-24
  • 2022-12-23
  • 2021-04-11
猜你喜欢
  • 2021-11-27
  • 2021-12-31
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
相关资源
相似解决方案