<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>js eval()</title> </head> <body> <script> /*参考:https://www.cnblogs.com/ranyonsue/p/6124708.html*/ let s = "true"; let b = eval(s); console.log("b:", b, typeof b); // b: true boolean </script> </body> </html>
js eval.html
猜你喜欢
转载自blog.csdn.net/weixin_42193179/article/details/104967156
今日推荐
周排行