Question

I am placing the below inside document.write(). But its a third party function & the first param is the key and second is the value. I will be passing the value , so it cannot be inside document.write() . So how do I write it?

document.write('populateData("Number",shownum);');
Était-ce utile?

La solution

If you're asking how to concatenate strings in Javascript, it would look like this, using the + operator:

document.write('populateData("Number", "' + shownum + '");');
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top