Js獲取asp頁(yè)面返回的值(加載值)實(shí)現(xiàn)代碼_ASP教程
推薦:asp教程中g(shù)et post提交表單有5點(diǎn)區(qū)別asp教程中g(shù)et post提交表單有5點(diǎn)區(qū)別分別以HTTP請(qǐng)求,表單兩者分別介紹,需要的朋友可以了解下
復(fù)制代碼 代碼如下:www.hl5o.cn
<!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="點(diǎn)擊加載" onclick="call_server();" />
<input type="text" style=" width:265px; height:68px;" id="aja_cnts" />
</body>
</html>
獲取頁(yè)面Response.asp代碼:document.getElementById('aja_cnts').value
Response.asp代碼示例:
復(fù)制代碼 代碼如下:www.hl5o.cn
<%
Response.Write "您好!歡迎光臨悠9小店!"
Response.Write "我們的網(wǎng)址是:http://you9luck.taobao.com"
%>
分享:ASP wsImage組件添加水印的實(shí)用代碼ASP給圖片加水印是需要組件的,常用的有aspjpeg軟件和中國(guó)人自己開(kāi)發(fā)的wsImage軟件,可以上網(wǎng)搜索下載這兩個(gè)軟件,推薦使用咱們中國(guó)人自己開(kāi)發(fā)的wsImage,畢竟是中文版,容易操作
相關(guān)ASP教程:
- asp FSO 讀寫(xiě)文件本文件實(shí)現(xiàn)代碼
- asp中isNull、isEmpty和空字符串的區(qū)別
- asp獲取用戶真實(shí)IP地址的方法
- asp連接sqlserver數(shù)據(jù)庫(kù)實(shí)現(xiàn)代碼
- asp中正則表達(dá)式過(guò)濾html代碼函數(shù)
- asp中g(shù)et post提交表單區(qū)別
- 網(wǎng)頁(yè)模板:ASP內(nèi)建對(duì)象Request
- xmlhttp的open方法使用詳解
- ASP的常用的自定義函數(shù)大全
- asp中用for循環(huán)的一個(gè)小技巧
- eWebEditor v3.8 列目錄
- ASP無(wú)組件分頁(yè)實(shí)現(xiàn)思路及代碼
ASP教程Rss訂閱編程教程搜索
ASP教程推薦
- 怎樣用ASP程序判斷一個(gè)盤(pán)上是否有文件
- asp怎樣實(shí)現(xiàn)rar壓縮和解壓縮源代碼
- ASP常用函數(shù):Str4Js()
- asp快速分頁(yè)代碼
- 用ASP實(shí)現(xiàn)網(wǎng)上考試系統(tǒng)
- ASP實(shí)例:Access為后臺(tái)數(shù)據(jù)庫(kù)的網(wǎng)站統(tǒng)計(jì)系統(tǒng)
- 在ASP查詢條件中包含單引號(hào)時(shí)的解決方法
- ASP編程中15個(gè)非常有用的例子
- 解讀asp的RegExp對(duì)象正則表達(dá)式功能用法
- asp 標(biāo)記字符串中指定字符變色不區(qū)分大小寫(xiě)
- 相關(guān)鏈接:
- 教程說(shuō)明:
ASP教程-Js獲取asp頁(yè)面返回的值(加載值)實(shí)現(xiàn)代碼
。