converting String true/false to Boolean value
This question already has an answer here:
var val = (string === "true");
你可以简单地使用: var result = (str == "true")
。
如果您使用变量结果:
result = result == "true";
链接地址: http://www.djcxy.com/p/75064.html