How to replace a charcter within a text For instance
<script>alert("Hi i am nishant");</script>
here i want to replace < and > by ASCII code so how i will replace it.
var text = text.replace(/</g, "<").replace(/>/g, ">");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.