// Escape any HTML-sensitive characters (<, > and &) function htmlEncode(string) { return string.replace(/[<&>]/g, function(c) { return {'<': '<', '&': '&', '>': '>'}[c] }); }
沒有留言:
張貼留言