sj 网页前端与后台数据交互的3种方式
作者:互联网
1.ajax 网页访问
2.form 表单
用户名<input class="yonghu" type="text" id="user" name="u">
密 码<input class="password" id="pass" name="p">
<form action="login.php" method="POST" id="myform
">
function test(){
var myform = document.getElementById("myform");
var pass= document.getElementById("pass");
pass.value = pass.value+"123";
myform.submit();
}//页面会有跳转 form 提交的是NAME值 搜 name submit getElementById
3.脚本标签
var s = document.createElement("script");
s.src="http://localhost/login.php?user=123&pass=456";
$("head").append(s)
Callback
标签:myform,网页,submit,sj,getElementById,pass,var,document,交互 来源: https://www.cnblogs.com/aladam/p/10792632.html