Home  >  Article  >  Web Front-end  >  多引号嵌套的变量命名的问题_javascript技巧

多引号嵌套的变量命名的问题_javascript技巧

WBOY
WBOYOriginal
2016-05-16 16:48:591261browse
复制代码 代码如下:

var i=0;
function addForm(){
i++;
var textExtra='

';
$("#inforForm").append(textExtra);
}

实现的效果是点击增加一个文本框进表单里面,自动命名name,被单引号双引号的嵌套搞得头大……
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn