经典ASP响应写语句
Classic ASP Response write statement
在 html 中这些是有效的,我如何编写一个代码,它使用经典 asp 中的 response write 语句用于下面的 HTML 语句?
<div id="the_div" style="border: 1px solid red"><iframe src=asp3.asp> <br><br></div>
<a href="#" onclick="hide('the_div');return false;">Hide the div until this link is click again.</a><br>
<a href="#" onclick="remove('the_div');return false;">Remove the div until this link is click again.</a>
我在下面试过但没有成功,是吧?
response.write "<div id='the_div'><iframe src=asp3.asp> </iframe><br><br></div>"
response.Write "<a href='#' onclick='hide('the_div');return false;">"Hide the div until this link is click again.</a><br>"
response.Write "<a href='#' onclick='remove('the_div');return false;">"Remove the div until this link is click again.</a>"
如果需要在 Response.Write 语句中转义,请使用双引号,即
Response.Write "<div id=""the_div"" style=""border: 1px solid red""><iframe src=""asp3.asp""> </iframe><br><br></div>"
Response.Write "<a href=""#"" onclick=""hide('the_div');return false;"">Hide the div until this link is click again.</a><br>"
Response.Write "<a href=""#"" onclick=""remove('the_div');return false;"">Remove the div until this link is click again.</a>"
您可以像您尝试的那样使用单引号而不是双引号,但是如果您已经将它们与 JS onclick 事件一起使用,它开始看起来非常混乱,并且您可能会发现存在冲突
在 html 中这些是有效的,我如何编写一个代码,它使用经典 asp 中的 response write 语句用于下面的 HTML 语句?
<div id="the_div" style="border: 1px solid red"><iframe src=asp3.asp> <br><br></div>
<a href="#" onclick="hide('the_div');return false;">Hide the div until this link is click again.</a><br>
<a href="#" onclick="remove('the_div');return false;">Remove the div until this link is click again.</a>
我在下面试过但没有成功,是吧?
response.write "<div id='the_div'><iframe src=asp3.asp> </iframe><br><br></div>"
response.Write "<a href='#' onclick='hide('the_div');return false;">"Hide the div until this link is click again.</a><br>"
response.Write "<a href='#' onclick='remove('the_div');return false;">"Remove the div until this link is click again.</a>"
如果需要在 Response.Write 语句中转义,请使用双引号,即
Response.Write "<div id=""the_div"" style=""border: 1px solid red""><iframe src=""asp3.asp""> </iframe><br><br></div>"
Response.Write "<a href=""#"" onclick=""hide('the_div');return false;"">Hide the div until this link is click again.</a><br>"
Response.Write "<a href=""#"" onclick=""remove('the_div');return false;"">Remove the div until this link is click again.</a>"
您可以像您尝试的那样使用单引号而不是双引号,但是如果您已经将它们与 JS onclick 事件一起使用,它开始看起来非常混乱,并且您可能会发现存在冲突