Whois Server Version 2.0<br> <br> Domain names in the .com and .net domains can now be registered<br> with many different competing registrars. Go to http://www.internic.net<br> for detailed information.<br> <br> 红色的是body得到的值,我发现它只能显示其中的“Whois Server Version 2.0<br>”这一行,读到下一行就出错,我调用方式是 index.asp页 <div id="detail"></div> <script language="javascript" type="text/javascript" src="loading.asp?Domain=163.com"></script> loading.asp页 Response.Write "document.getElementById('detail').innerHTML ='"&body&"';" body中的单引号和双引号都被替换掉了。请帮我看看,调试了好久了,搞不明白。
补充一下,loading.asp可以全部读取body值,就是只能传递"Whois Server Version 2.0 <br>”这一行到detail,这一行以下内容不能传递。
body值: ------------- Whois Server Version 2.0 <br> <br> Domain names in the .com and .net domains can now be registered <br> with many different competing registrars. Go to http://www.internic.net <br> for detailed information. <br> <br> ------------- 提示“未结束的字符串常量” 问题可能出现最后:Response.Write " <script>document.getElementById('detail').innerHTML ='"&body&"'; </script>" 可是当只取第一行时能正常显示在index.asp的detail中,取全部就出现提示“未结束的字符串常量”,真是郁闷,真的想放弃这种效果了。这个程序就是查询whois信息的,效果和http://tool.chinaz.com/Whois/Default.aspx一样.
body = Replace(body,"'","\'") body = Replace(body,vbCrLf,"")Response.Write " <script>document.getElementById('detail').innerHTML ='"&body&"'; </script>" 因为你的里面有换行啊。
把报错的html源文件贴出来
向前台输出时 注意"" 和''要交替应用,如果外层用""那么内层就要用'',反之也一样;
如 obj.innerHTML="<div id='div1' name='div11'></div>";
Whois Server Version 2.0<br>
<br>
Domain names in the .com and .net domains can now be registered<br>
with many different competing registrars. Go to http://www.internic.net<br>
for detailed information.<br>
<br>
红色的是body得到的值,我发现它只能显示其中的“Whois Server Version 2.0<br>”这一行,读到下一行就出错,我调用方式是
index.asp页
<div id="detail"></div>
<script language="javascript" type="text/javascript" src="loading.asp?Domain=163.com"></script>
loading.asp页
Response.Write "document.getElementById('detail').innerHTML ='"&body&"';"
body中的单引号和双引号都被替换掉了。请帮我看看,调试了好久了,搞不明白。
你是这样的调用形式没注意提示的什么错误
-------------
Whois Server Version 2.0 <br>
<br>
Domain names in the .com and .net domains can now be registered <br>
with many different competing registrars. Go to http://www.internic.net <br>
for detailed information. <br>
<br>
-------------
提示“未结束的字符串常量”
问题可能出现最后:Response.Write " <script>document.getElementById('detail').innerHTML ='"&body&"'; </script>"
可是当只取第一行时能正常显示在index.asp的detail中,取全部就出现提示“未结束的字符串常量”,真是郁闷,真的想放弃这种效果了。这个程序就是查询whois信息的,效果和http://tool.chinaz.com/Whois/Default.aspx一样.
body = Replace(body,vbCrLf,"")Response.Write " <script>document.getElementById('detail').innerHTML ='"&body&"'; </script>" 因为你的里面有换行啊。
你看看 http://www.qisoe.com 随便一个关键字,然后看右上有提示搜索到几条的,就是这样做的
你是少了单引号,所以不行,哈哈,多多注意一下就行了