有没有办法使用asp变量在html中包含文件?
问题描述:
我想包括在HTML文件中,但我想用ASP来传递一个变量(即)有没有办法使用asp变量在html中包含文件?
<% Dim s = "file.html %>
<!-- #include file="<% s %>"-->
似乎并没有得以顺利,有没有解决的办法来获得上述工作?
答
会这样的工作吗?
<% if condition Then %>
<!--#include file="File1.htm"-->
<% elseif condition Then %>
<!--#include file="File2.htm"-->
<% end if %>
答
这是怎么回事?
<% Server.Execute "" & s & ".html" %>