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);');
有帮助吗?

解决方案

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

document.write('populateData("Number", "' + shownum + '");');
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top