当js函数拼接传入参数为字符串时:报错Onclick Syntaxerror: identifier starts immediately after numeric literal
错误示例:
var device_mac = '11sesafsd23asd';
return "<button οnclick='test(" + device_mac + ")'";
正确做法:
var device_mac = '11sesafsd23asd';
return "<button οnclick='test(\"" + device_mac + "\")'";