jquery - Replacing double quotes while sending parameter to javascript function -
this jsfiddle :
i have button follows:
<button class="buttoncss" title="modify artifact file" onclick="setfiledescriptionforupdate('!@#$%^&*()_+-=~`{}|[]\:" ;'<>?,.="" ','state.dat','167','1','c:\\pp_artifactsuploadedfiles\evalid_318\state.dat');">modify</button>
in on click calling setfiledescriptionforupdate
function first parameter string , follows:
!@#$%^&*()_+-=~`{}|[]\:";'<>?,./
when " involved in string creates problem.
what changes can make avoid this??
please me.
use below code :-
var user = "hi \" user"; var test = user.replace("\"", ""); document.body.innerhtml = test;
Comments
Post a Comment