<
script
>
function
objAjax()
{
var
objxml
=
false
;
//
尝试创建Microsoft IE浏览器支持的对象
try
{
objxml
new
ActiveXObject(
"
Msxml2.XMLHTTP
);
}
catch
(e) {
Microsoft.XMLHTTP
aobjxml
}
如果创建不成功,则尝试创建非Microsoft IE浏览器支持的对象
if
(
!
&&
typeof
XMLHttpRequest
!=
'
undefined
) {
XMLHttpRequest();
return
objxml;
openurl(url)
objAjax();
var objxml=new ActiveXObject("Microsoft.XMLHttp") //建立
objxml.open(
GET
,url,
);
打开
objxml.send();
发送
retInfo
objxml.responseText; 接收 返回文本字符串
(objxml.readyState
==
1
)
初始化
{
document.getElementById(
aboutproDiv
).innerHTML
正在加载数据...
}
4
数据接收完毕
{
document.getElementById(
).style.display
none
隐藏
retInfo;
}
else
{
-2
checkapp(form){
infoBoard
document.getElementById(
aboutpro_i
myurl
getdis.aspx?pid=
+<!--
@proId@
-->+
&rnd=
+
Math.random();
retCode
openurl(myurl);
switch
(retCode){
case
: infoBoard.innerHTML
该商品暂无评论
break
default
:{
infoBoard.innerHTML
retCode;
}
;
/
script>
body onload
checkapp()
div id
DIV id
aboutproDiv
正在加载中...
</
DIV
<!--
@item@
-->
div
getdis.aspx cs代码
protected
void
Page_Load(
object
sender, EventArgs e)
(Request[
pid
]
null
)
{
string
strReturn
该商品暂无评论...
strSql
select * from cuspro where pid=
Request[
].ToString()
order by id desc
chat c
chat();
DataTable dt
c.SqlselectPro(strSql,
2
(dt.Rows.Count
{
strReturn
""
foreach
(DataRow dr
in
dt.Rows)
{
re
dr[
reply
].ToString();
(re
{
strReturn
+=
<div class='protitle'>评论者:
dr[
mname
].ToString()
ctime
&nbsp;&nbsp;对
pname
评论!</div>
; ;
<div class='aboutproitem'>
items
</div>
<div class='aboutproitem1'>
}
}
}
Response.Write(strReturn);