h...">Geek Answers HandbookHow to replace character in text by jqueryHow to replace a character in a text For example, <script>alert("Hi i am nishant");</script> here I want to replace <and> with ASCII code, since I will replace it.+5javascript jqueryNishant kumar Nov 25 '10 at 14:14source share1 answervar text = text.replace(/</g, "<").replace(/>/g, ">"); +6thejh Nov 25 '10 at 14:18source shareMore articles:WCF Authentication for IPC and Remote Access - authenticationjquery serialize and encodeURIComponent - javascriptHow to get TTL UDP packet in Java? - javaJava TTL IP Control? - javaЯвляется ли этот избыточный код? - c#Determine the remaining TTL multicast package in Java - javaC # FileSystemWatcher how to find out if a file is fully copied to the view folder - c #Calling a nested function when a function name is passed as a string - javascriptFunctional Dependence in Haskell - typesReducing compiler warnings - c ++All Articles
How to replace a character in a text For example,
<script>alert("Hi i am nishant");</script>
here I want to replace <and> with ASCII code, since I will replace it.
var text = text.replace(/</g, "<").replace(/>/g, ">");