javascript - Trying to change HTML with Jquery -
this question has reply here:
creating multiline strings in javascript 30 answersi'm trying alter html code using jquery. when utilize code works:
$('.theclass').html('hello');
but want include statemente in html. tried not work.
$('.theclass').html( "<select name='myname' id='myid'> <option value=''>-</option> <option value='a'>a</option> <option value='b'>b</option> </select>" );
any help? thanks
try concatenate
strings when string input exceeds out newer line,
$('.typehidden .controls').html( "<select name='myname' id='myid'>" + "<option value=''>-</option>" + "<option value='a'>a</option>" + "<option value='b'>b</option>" + "</select>" );
javascript jquery html
No comments:
Post a Comment