html转js函数
'html转js函数
function htmltojs(str)
dim tojs,i
str = Replace(str, Chr(10), "")
str = Replace(str, Chr(32) & Chr(32), "")
str = Split(str, Chr(13))
tojs=""
For i = 0 To UBound(str)
If Trim(str(i)) <> "" Then
str(i) = Replace(str(i), Chr(34), Chr(39))
tojs = tojs & "document.write(" & Chr(34) & str(i) & Chr(34) & ");" & Chr(10)
End If
Next
htmltojs = tojs
end function