jquery - Replacing double quotes while sending parameter to javascript function -


this jsfiddle :

http://jsfiddle.net/5kdek3vn/

i have button follows:

<button class="buttoncss" title="modify artifact file" onclick="setfiledescriptionforupdate('!@#$%^&amp;*()_+-=~`{}|[]\:" ;'&lt;&gt;?,.="" ','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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -