ASP javascript 转asp vbscript,谁能把下面的代码转换下?
ASPjavacript代码:Response.Write(Server.HTMLEncode(MM_keepNone)+((MM_keepNone)!="")?"&":...
ASP javacript代码:
Response.Write(Server.HTMLEncode(MM_keepNone) + ((MM_keepNone)!="")?"&":"") + "id=" + rs1.Fields.Item("id").Value) 展开
Response.Write(Server.HTMLEncode(MM_keepNone) + ((MM_keepNone)!="")?"&":"") + "id=" + rs1.Fields.Item("id").Value) 展开
2个回答
展开全部
If MM_keepNone<>"" Then
Response.Write Server.HTMLEncode(MM_keepNone) & "&" & "id=" & rs1.Fields.Item("id").Value
Else
Response.Write Server.HTMLEncode(MM_keepNone) & "id=" & rs1.Fields.Item("id").Value
End If
或者换个方式可能更好懂
Dim tChar
If MM_keepNone<>"" Then tChar = "&" Else tChar = ""
Response.Write Server.HTMLEncode(MM_keepNone) & tChar & "id=" & rs1.Fields.Item("id").Value
Response.Write Server.HTMLEncode(MM_keepNone) & "&" & "id=" & rs1.Fields.Item("id").Value
Else
Response.Write Server.HTMLEncode(MM_keepNone) & "id=" & rs1.Fields.Item("id").Value
End If
或者换个方式可能更好懂
Dim tChar
If MM_keepNone<>"" Then tChar = "&" Else tChar = ""
Response.Write Server.HTMLEncode(MM_keepNone) & tChar & "id=" & rs1.Fields.Item("id").Value
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询