Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/68.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
Jquery 为什么removeClass不起作用-我的编码有什么错误?_Jquery_Removeclass - Fatal编程技术网

Jquery 为什么removeClass不起作用-我的编码有什么错误?

Jquery 为什么removeClass不起作用-我的编码有什么错误?,jquery,removeclass,Jquery,Removeclass,如果我的html是 <form class="form1" id="registerPublicFRM" action="" method="post"> <label for="firstname">First name:</label><div class="errRnd"><input name="firstname" id="firstname" size="28" type="text"></div>

如果我的html是

<form class="form1" id="registerPublicFRM" action="" method="post">
    <label for="firstname">First name:</label><div class="errRnd"><input name="firstname" id="firstname" size="28" type="text"></div>       
     <input value="Register" type="submit">
</form>
class=“errRnd”
转换为
class=”“

事实上,它仍然存在

<div class="errRnd">


谢谢各位的回答。我的错-我在func中有一段丢失的代码,它还添加了一个边框

你怎么知道它还在?你可能看过原始页面的来源了吗?假设该类实际上没有被删除,那么控制台中是否有任何错误?是否正在查看源代码?或者在浏览器的开发人员工具中查看DOM工具?源代码永远不会更改,您需要查看更新的DOM。对我来说,类errRnd在字段周围放置了一个红色边框,应该会消失。当我在浏览器页面上按住Ctrl-A键并查看源代码时,该类仍然是“errRnd”。谢谢大家。@Shaun查看源代码通常会显示未被jquery修改的原始源代码。右键单击并单击“检查元素”以查看页面的当前状态。
<div class="errRnd">