function htmlspecialchars(ch) {
ch = ch.replace(/&/g,"&")
ch = ch.replace(/\"/g,""")
ch = ch.replace(/\'/g,"'")
ch = ch.replace(/</g,"<")
ch = ch.replace(/>/g,">")
return ch
}
function antihtmlspecialchars(ch) {
ch = ch.replace("&","&")
ch = ch.replace(""","\"")
ch = ch.replace("'","\'")
ch = ch.replace("<","<")
ch = ch.replace(">",">")
return ch
}
沒有留言:
張貼留言