javascript使用字符串作为参数报错的问题

原因:因为直接字符串作为参数需要加单引号,不然就判定为为定义的参数

 function option(value, row, index) 
{
  var htm = "";
  htm += ''
  return htm;
            }

解决方案:onclick里面加入转义字符\'

 function option(value, row, index) {
    var htm = "";
    htm += ''
    return htm;
            }

完美解决

你可能感兴趣的:(前端问题&解决方案,elementui,前端,flask,javascript,python)