Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要知道//URL 注释上的双斜杠是否会产生错误:
//
function jsFunction(){ //http://google.com var str="..."; }
除了语法高亮相关的错误
//是单行注释,同一行后面的任何内容都将被注释掉,甚至更多/字符。
/
/*用于开始多行注释。接下来*/将结束多行注释。如果您尝试注释掉正则表达式,这可能是一个问题:
/*
*/
/** var foo = /.*/g */