Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Coding Cookbook/JavaScript Encode

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Encode special characters in a string, so that it can be displayed using JavaScript VBScript solution function JSEncode (sInput) JSEncode = sInput JSEncode = Replace (JSEncode, chr(0), "") JSEncode = Replace (JSEncode, "'", "\'") JSEncode = Replace (JSEncode, """", "\""") JSEncode = Replace (JSEncode, "&", "\x26") end function JavaScript Encode JavaScript Encode