Javascript 基于jQuery中的DOM更改启用和禁用Span类
我有一个聊天图标,当前编码为:Javascript 基于jQuery中的DOM更改启用和禁用Span类,javascript,jquery,Javascript,Jquery,我有一个聊天图标,当前编码为: <li class="hidden-xs"><a href="#" class="right-bar-toggle waves-effect"> <i class="fa fa-comments "></i> </a></li> 聊天室显示在: <p id="history"></p> 聊天室html将显示为: <p id="history"> <
<li class="hidden-xs"><a href="#" class="right-bar-toggle waves-effect">
<i class="fa fa-comments "></i>
</a></li>
聊天室显示在:
<p id="history"></p>
聊天室html将显示为:
<p id="history">
<p class="mine">Me: Hi</p>
<p class="theirs">User-1: Hello</p>
<p class="mine">Me: I am testing</p>
<p class="theirs">User-1: Okay</p>
</p>
我:嗨
用户1:您好
我:我正在测试
用户1:好的
时,需要禁用span class=徽章并重置计数器。这是我输入消息后的一次李>
使用jQuery怎么可能呢?提前谢谢 如果你不尝试manSorry,这是不可能的……我是javascript的新手。
<p id="history"></p>
#history {
width: 100%;
height: calc(100% - 40px);
overflow: auto;
}
#history .mine {
color: #07715b;
text-align: left;
margin-left: 10px;
}
#history .theirs {
color: #4398db;
text-align: left;
margin-left: 10px;
}
<p id="history">
<p class="mine">Me: Hi</p>
<p class="theirs">User-1: Hello</p>
<p class="mine">Me: I am testing</p>
<p class="theirs">User-1: Okay</p>
</p>