Fetch the repository succeeded.
This action will force synchronization from Ikaros/ 嵌入式web服务器BOA+CGI+HTML+MySQL项目实战, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>config</title>
<script src="js/jquery-2.2.3.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<link type="text/css" href="css/jquery-ui.min.css" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<script src="js/bootstrap.min.js"></script>
<script src="js/my.js"></script>
<link type="text/css" href="css/config.css" rel="stylesheet">
</head>
<body>
<div id="head">
<div class="banner">
<div class="nav">
<ul class = "box">
<li><a href="#"><h3>logo</h3></a></li>
<li><a href="#"><h3>首页</h3></a></li>
<li><a href="base_config.html"><h3>系统设置</h3></a></li>
<li><a href="#"><h3>Ajax</h3></a></li>
<li><a href="login.html"><h3>切换帐号</h3></a></li>
<li><a href="login.html"><h3>退出</h3></a></li>
</ul>
</div>
</div>
</div>
<br>
<div id="center">
<h5>ajax获取后端返回数据:</h5>
<input class="form-control" id="text" type="text" value="">
<input type="button" value="获取" onclick="get();">
</div>
<div class="bottom">
<div class="footer">
</div>
</div>
</body>
<script>
function get()
{
var xmlhttp;
if(window.XMLHttpRequest)
{
//code for IE7+,Firefox,Chrome,Opera,Safari
xmlhttp=new XMLHttpRequest();
}
else
{
//code for IE6,IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4 && xmlhttp.status==200)
{
//将接收到的字符串存入str
var str = xmlhttp.responseText;
if(str.length == 0)
{
return;
}
// 解决XML, 解析错误:语法错误
try //Internet Explorer
{
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = "false";
xmlDoc.loadXML(text);
} catch (e) {
try //Firefox, Mozilla, Opera, etc.
{
parser = new DOMParser();
xmlDoc = parser.parseFromString(str, "text/xml");
} catch (e) { alert(e.message) }
}
var ret = xmlDoc.getElementsByTagName('p')[0].textContent;
if(ret.length == 0)
{
}
else
{
document.getElementById("text").value = ret;
}
}
}
xmlhttp.open("GET","cgi-bin/get.cgi?get",true);
xmlhttp.send();
}
</script>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。