首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

怎么用JS调用ASP里的内容

2012-02-09 
如何用JS调用ASP里的内容如何用JS调用ASP里的内容啊给个简单的例子http://community.csdn.net/Expert/topi

如何用JS调用ASP里的内容
如何用JS调用ASP里的内容啊
给个简单的例子
http://community.csdn.net/Expert/topic/5531/5531128.xml?temp=.9924433

[解决办法]
var xmlhttp=new ActiveXObject( "Msxml2.XMLHTTP ");//用兼容IE,FF的xmlhttprequest创建方法替换
xmlhttp.open( "GET ", "xxx.asp ",true);//调用xxx.asp
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
showDiv.innerHTML = xmlhttp.responseText;//把xxx.asp的内容显示到指定的showDiv中
}
xmlhttp.send(null);

热点排行