肾积水严重吗怎么调理:response.write中怎样输出html标签

来源:百度文库 编辑:神马品牌网 时间:2024/04/29 04:05:05
response.write("<a href="main.asp">你已登陆,点击这里到下一页</a>")

上面这句为什么会出错?说是“缺少 ')'”

response.write中怎样输出html标签?

response.write("<a href=main.asp>你已登陆,点击这里到下一页</a>")
字符串内不能出现""所有把main.asp前后的""去掉或改成''

把里面的双引号改为单引号,写成:
response.write(\"<a href=\'main.asp\'>你已登陆,点击这里到下一页</a>\")

如果你真要用双引号的话,就用两个双引号表示,写成:
response.write(\"<a href=\"\"main.asp\"\">你已登陆,点击这里到下一页</a>\")

要想用response.write输出html标签,首先要做如下设置:
Response.ContentType = "text/plain";
Response.Charset = "UTF-8";
输出方法如下:
String strHtml="<img src=""image/win.gif"" width=""35"" height=""37"">"
response.write(strHtml);