Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

passing string parameter in javascript function

//string should be in "", so you need to escape them!
document.write("<button id='button' type='button' onclick="getHistoryByYear('+ year + "," + '&quot;' +  string  + '&quot;' +')">click</button>")
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #passing #string #parameter #javascript #function
ADD COMMENT
Topic
Name
9+4 =