佳木斯湛栽影视文化发展公司

主頁 > 知識庫 > Js獲取asp頁面返回的值(加載值)實(shí)現(xiàn)代碼

Js獲取asp頁面返回的值(加載值)實(shí)現(xiàn)代碼

熱門標(biāo)簽:Mysql連接數(shù)設(shè)置 銀行業(yè)務(wù) 服務(wù)器配置 Linux服務(wù)器 阿里云 電子圍欄 科大訊飛語音識別系統(tǒng) 團(tuán)購網(wǎng)站
復(fù)制代碼 代碼如下:

!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>

獲取頁面Response.asp代碼:document.getElementById('aja_cnts').value
Response.asp代碼示例:
復(fù)制代碼 代碼如下:

%
Response.Write "您好!歡迎光臨悠9小店!"
Response.Write "我們的網(wǎng)址是:http://you9luck.taobao.com"
%>
您可能感興趣的文章:
  • JS實(shí)現(xiàn)隨頁面滾動顯示/隱藏窗口固定位置元素
  • js,jquery滾動/跳轉(zhuǎn)頁面到指定位置的實(shí)現(xiàn)思路
  • js頁面滾動時層智能浮動定位實(shí)現(xiàn)(jQuery/MooTools)
  • js點(diǎn)擊返回跳轉(zhuǎn)到指定頁面實(shí)現(xiàn)過程
  • Javascript實(shí)現(xiàn)返回上一頁面并刷新的小例子
  • Jquery Ajax 學(xué)習(xí)實(shí)例2 向頁面發(fā)出請求 返回JSon格式數(shù)據(jù)
  • JS window.opener返回父頁面的應(yīng)用
  • JS實(shí)現(xiàn)頁面進(jìn)入和返回定位到具體位置

標(biāo)簽:衢州 萍鄉(xiāng) 江蘇 大理 蚌埠 棗莊 廣元 衡水

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《Js獲取asp頁面返回的值(加載值)實(shí)現(xiàn)代碼》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266
    固始县| 大埔区| 景宁| 临江市| 云和县| 房产| 辽宁省| 塘沽区| 武宣县| 沾化县| 巴里| 华安县| 互助| 射阳县| 陆良县| 四平市| 永胜县| 宝鸡市| 崇礼县| 江源县| 交口县| 彰化市| 西藏| 林周县| 科技| 潜江市| 上杭县| 宿松县| 灵川县| 古丈县| 屏边| 皮山县| 昆山市| 和田县| 长泰县| 石林| 介休市| 临湘市| 湟中县| 兴文县| 香港|