0
我試圖在global.asa中創建以下變量。global.asa中的if/then語句的變量
<p>abc
<% If Request.ServerVariables("url") <> "/mobile.asp" Then %><a class="desk" href="/Photos/E.jpg"><% End If %>def<% If Request.ServerVariables("url") <> "/mobile.asp" Then %></a><% End If %>,
ghi.</p>
我的語法必須是關閉的,因爲它沒有采取。或者有更好的方法來做到這一點?基本上,我想包含一些帶有一些asp代碼的html代碼片段,而不需要使用#Include文件。我正在使用asp classic。謝謝。
正如下面提到的Shadow Wizard,你不能把HTML放在global.asa中,因爲它不是一個呈現輸出到瀏覽器的文件。我不確定你想要的目的是什麼,但是根據我看到的你想要將該代碼定位到.asp文件 –