网页制作两个问题一起问

来源:百度知道 编辑:UC知道 时间:2024/06/11 02:54:40
1.为什么在HTML文件里面使用<!--#include file="**.asp/html"-->(里面是后缀名)在DREAMWERA里面是成功的,但在测试时不正确。
2.怎么在HTML里面调用ASP页面,<script language='javascript' src='hynews.asp'></script>或<script language=“javascript” src=“hynews.asp”></script>没成功

在线等回答

问题1、上面的写法更多的是在asp、php等情况下用的,并且在html页面中,不能用inclue来调asp文件吧。在html文件里面用包含文件为什么测试不行,具体原因我也不太清楚。你可以使用下面一些方法。
1.iframe
<iframe name="content_frame" marginwidth=0 marginheight=0 width=100% height=30 src="import.htm" frameborder=0></iframe>
2.object
<object style="border:0px" type="text/x-scriptlet" data="import.htm" width=100% height=30></object>
3.Behavior的download方式
<span id=showImport></span>
<IE:Download ID="oDownload" STYLE="behavior:url(#default#download)"/>
<script>
function onDownloadDone(downDate){
showImport.innerHTML=downDate
}
oDownload.startDownload('import.htm',onDownloadDone);
</script>

问题2:只要在asp页面里将要输出的数据用document.write写出来就可以。也就是asp文件在服务器端解析后里面的内容是js的就可以了。
如:
<%response.w