Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/434.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jQuery-2.1.1.min.js或最新版本jQuery-2.13.min.js不会';t支持'@';性格如果是,那么如何使其支持'@';?_Javascript_Jquery - Fatal编程技术网

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")