复制代码 代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>Getting Server side data using AJAX</title>
</head>
<script>
function creat_Object() {
var xmlhttp;
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
try {
xmlhttp = new XMLHttpRequest();
}
catch (e) {
alert("Your browser is not supporting XMLHTTPRequest"); <BR> xmlhttp = false;
}
}
else {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
return xmlhttp;
}
var request = creat_Object();
function sever_interaction() {
if (request.readyState == 1) {
document.getElementById('aja_cnts').value = '';
document.getElementById('aja_cnts').value = 'Loading...';
}
if (request.readyState == 4) {
var answer = request.responseText;
document.getElementById('aja_cnts').value = '';
document.getElementById('aja_cnts').value = answer;
}
}
function call_server() {
request.open("GET", "Response.asp");
request.onreadystatechange = sever_interaction; request.send('');
}
</script>
<body>
<input type="button" name="btnLoad" id="btnLoad" value="点击加载" onclick="call_server();" />
<input type="text" style=" width:265px; height:68px;" id="aja_cnts" />
</body>
</html>
获取页面Response.asp代码:document.getElementById('aja_cnts').value
Response.asp代码示例:
复制代码 代码如下:
<%
Response.Write "您好!欢迎光临悠9小店!"
Response.Write "我们的网址是:http://you9luck.taobao.com"
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>Getting Server side data using AJAX</title>
</head>
<script>
function creat_Object() {
var xmlhttp;
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
try {
xmlhttp = new XMLHttpRequest();
}
catch (e) {
alert("Your browser is not supporting XMLHTTPRequest"); <BR> xmlhttp = false;
}
}
else {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
return xmlhttp;
}
var request = creat_Object();
function sever_interaction() {
if (request.readyState == 1) {
document.getElementById('aja_cnts').value = '';
document.getElementById('aja_cnts').value = 'Loading...';
}
if (request.readyState == 4) {
var answer = request.responseText;
document.getElementById('aja_cnts').value = '';
document.getElementById('aja_cnts').value = answer;
}
}
function call_server() {
request.open("GET", "Response.asp");
request.onreadystatechange = sever_interaction; request.send('');
}
</script>
<body>
<input type="button" name="btnLoad" id="btnLoad" value="点击加载" onclick="call_server();" />
<input type="text" style=" width:265px; height:68px;" id="aja_cnts" />
</body>
</html>
获取页面Response.asp代码:document.getElementById('aja_cnts').value
Response.asp代码示例:
复制代码 代码如下:
<%
Response.Write "您好!欢迎光临悠9小店!"
Response.Write "我们的网址是:http://you9luck.taobao.com"
%>
标签:
返回值,ASP返回值
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com
暂无“Js获取asp页面返回的值(加载值)实现代码”评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。