I need to send a serialized data as parameter in a javascript function as shown below.
<input type="button" id="btn1" onclick="fncname('{"data":"testval"}';)">
I am getting error unterminated string constant.
Can anyone help me to find out a solution for this?