i want to add backslash after apostrof character (')
before thi's is string
after thi\'s is string (I want like this)
okey, this is my code,
function showdata(mydata)
{
alert (mydata)
}
//if this click, show alert showdata
<%
String mydata= "Hello Worl'd";
%>
<a onclick="showdata('<% out.print(mydata.replace("'","\\\'")); %>'); return false;">Click Data</a>
i already click, this alert not show
Help me, Thank's