<input id="myID" onClick="CheckAll('A','B');" />
In the project,the above code need to be put into String(see 2nd snippet). However, the CheckAll() is already inside the single quote. If two parameters are inside Single quote in checkAll() like 2nd code snippet, the checkAll() won't work.
How to fix the 2nd code snippet?
Thanks in advance and any help will be really appreciated!
$string ="<input id='myID' onClick='CheckAll('A','B');' />"
You can use backslash:
$string ="<input id=\"myID\" onClick=\"CheckAll('A','B');\" />"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With