Javascript jQuery-2.1.1.min.js或最新版本jQuery-2.13.min.js不会';t支持'@';性格如果是,那么如何使其支持'@';?
检查单词“Javascript jQuery-2.1.1.min.js或最新版本jQuery-2.13.min.js不会';t支持'@';性格如果是,那么如何使其支持'@';?,javascript,jquery,Javascript,Jquery,检查单词“”时_test1@localhost”,在我的代码中输入jquery-2.1.1.min.js文件的jquery.fn.init函数,在该函数中用模式检查传递的单词, /^(?:\s*()[^>]*|#([\w-]*)$/。 所以检查失败了。它不支持存在@字符。请给出解决方案。您可以选择如下元素 <input type="text" id="participant_test1@localhost" value="Some Text"/> 我没有看到任何jQuery(只有j
”时_test1@localhost
”,在我的代码中输入jquery-2.1.1.min.js
文件的jquery.fn.init函数,在该函数中用模式检查传递的单词,
/^(?:\s*()[^>]*|#([\w-]*)$/
。
所以检查失败了。它不支持存在@字符。请给出解决方案。您可以选择如下元素
<input type="text" id="participant_test1@localhost" value="Some Text"/>
我没有看到任何jQuery(只有javascript?)。你能添加你的代码吗?你想选择一个有
id
的元素,比如#参与者_test1@localhost
?请提供用于“输入”jQuery的代码。仍然不明白为什么有人会在元素ID中使用@
。
$("#participant_test1\\@localhost")