Commit dde940cb by hxw

删除 update2.html

parent fba00318
<!DOCTYPE HTML>
<html>
<head>
<title> QA </title>
<script src="http://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
<meta charset=UTF-8>
</head>
<body>
<div style="background-color:#ccc;-moz-border-radius: 5px;-webkit-border-radius: 5px;border:1px solid #000;padding:10px;margin-top:100px;width:800px;height:500px;text-align:center;margin:50px auto;">
<form id="frm" onsubmit="return false" action="##" method="post">
<p>用户名:<input name="userName" type="text" id="txtUserName" tabindex="1" value=""/></p>
<p>内 容:<textarea style="width:700px;height:320px;word-break:break-all" name="config_string" type="password" id="TextBox2" tabindex="2" value=""></textarea></p>
<p><input type="button" value="登录" onclick="update()">&nbsp;<input type="reset" value="重置"></p>
</form>
</div>
<div style="background-color:#ccc;-moz-border-radius: 5px;-webkit-border-radius: 5px;border:1px solid #000;padding:10px;margin-top:100px;width:800px;height:auto;text-align:center;margin:50px auto;">
<div id="returnInfo"></div>
</div>
<script type="text/javascript">
function update() {
$.ajax({
//几个参数需要注意一下
type: "POST",//方法类型
dataType: "text",//预期服务器返回的数据类型
url: "update" ,//url
data: $('#frm').serialize(),
success: function (result) {
var list = result.split("---")
var str = "";
for (var i = 0;i < list.length;i++){
str += '<div>'+list[i]+'</div>'
}
document.getElementById("returnInfo").innerHTML = str
},
error : function(res) {
// document.getElementById("returnInfo").appendChild() = res;
}
});
}
</script>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment