The problem of nested variable names with multiple quotes
- 2020-03-30 02:56:12
- OfStack
var i=0;
function addForm(){
i++;
var textExtra='<p><input type="text" name='+"addInput"+i+' class="addInp"/></p>';
$("#inforForm").append(textExtra);
}
The effect is to click to add a text box into the form, automatically name the name, the single quotes double quotes nested big head......