大堂经理客户欣喜案例:用asp输出javascript中的问题?

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/29 17:17:24
response.Write"<script language=javascript>"
response.Write"var ParentID;"
response.Write"alert('评论成功!');"
response.Write"window.location='ShowArticle.asp?F_id='ParentID;"//就是这句,不能或取ParentID,是怎么搞的,到底什么时候用单引号什么是时候用双引号呢.大家能能帮忙.小弟在此谢过.

response.Write"</script>"

response.Write "window.location='ShowArticle.asp?F_id=" & ParentID & "'"

应该是这样吧.

response.write""此处双引号里面的是动态输出的内荣。ParentID是变量
前面要有记数及rs。rs是你定义的也可能是别的名称。
或者ParentID=request.form("ParentID")为变量赋之

response.Write"window.location='ShowArticle.asp?F_id=' & ParentID"

safdasf