企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# JSList 常见问题 ### '$'was used before it was defind. ``` /*jslint browser: true*/ /*global $, jQuery, alert*/ ``` ### Missing 'use stict' statement. ``` 'use strict'; 加前面 ``` ### Missing radix parameter. > 缺少基数参数 parseint的第二个参数没有指定;`` ``` parseInt(on_id) 改为 parseInt(on_id, 10) ``` ### Combine this with the previous 'var' statement. > 结合以前的“var”语句 ``` var on_id = $('nav ul li.on').index(); on_id = parseInt(on_id, 10) - 1; var html = $("nav ul li:eq(" + on_id + ")").find("a").attr("data-href"); 改为 var on_id, html; on_id = $('nav ul li.on').index(); on_id = parseInt(on_id, 10) - 1; html = $("nav ul li:eq(" + on_id + ")").find("a").attr("data-href"); 改 ``` ### Expected '===' and instead saw '=='. > 预期'===',而是看到'==='。 "==="叫做严格运算符,"=="叫做相等运算符。 ``` if ($(this).text() === "A") 改为 if ($(this).text() == "A") ```