javascript - close id with a quote - concatenation jquery -


i have problem concatenation table id variable. problem seems to close id quote:

" 

this variable

var mytable = $('<table id=\"paymenttable' + cnt + '\"' + '></table>') 

the problem closing id after variable cnt.

in output stream of concatenating looks this:

<table id="paymenttable3> 

where 3 cnt-variable.

greatful help!

make it

var mytable = $('<table id=\"paymenttable' + cnt + '\"></table>') 

you closing single quote ' without closing double quote " first.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -