标记::
<td class="info2 gensmall">
<span class="new1">In total there is <strong>1</strong> user online :: 1 Registered, 0 Hidden and 0 Guests </span>
<span class="new2">We have <strong>4</strong> registered users</span>
<span class="new3">The newest registered user is <strong><a href="/u5">cldtomhil</a></strong></span>
<span class="new4">Our users have posted a total of <strong>12</strong> messages</span>
</td>
好的,尝试学习 jQuery 的人.split
$(document).ready(function(){
var a = $('td .info2 .new1');
var b = $('td .info2 .new2');
var c = $('td .info2 .new3');
var d = $('td .info2 .new4');
var w = a.split("<strong>");
var x = b.split("<strong>");
var y = c.split("<strong>");
var z = d.split("<strong>");
$('.new1').html('<span>"w"</span> Users Online');
$('.new2').html('<span>"x"</span> Total Users');
$('.new3').html('<span>"y"</span> Newest Member');
$('.new4').html('<span>"z"</span> Total Messages')
});
好吧,我知道我做错了只是看看它。虽然我不知道如何使用拆分功能,但我正在尝试获取<strong>
标签内的信息。然后,一旦我有了它,我想基本上用我发布的新数据来更改innerHTML.html
是的,我知道它有很多变数,但是你能做什么,我还不是一个很好的编码器,而且还在学习一些东西。