首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CSS >

如何用选择器拿到这个值

2012-05-22 
怎么用选择器拿到这个值?dl idresearchdldt检索条件:题名font colorred经济/font /font

怎么用选择器拿到这个值?
<dl id="researchdl">
  <dt>检索条件:题名=<font color="red">经济</font> </font> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;结果数:<b><font color="red">1036</font></b> 
  &nbsp;&nbsp;<a target="_blank" href="search_rss.php?location=ALL&title=%E7%BB%8F%E6%B5%8E&doctype=ALL&lang_code=ALL&match_flag=forward&displaypg=20&showmode=list&orderby=DESC&use_flag=3&sort=CATA_DATE&onlylendable=yes"><img src="../tpl/red/images/rss.gif" alt="此检索条件下的结果RSS源" border="0" /></a>
  &nbsp;&nbsp;<b><a href="?location=ALL&title=%E7%BB%8F%E6%B5%8E&doctype=ALL&lang_code=ALL&match_flag=forward&displaypg=20&showmode=list&orderby=DESC&use_flag=3&sort=CATA_DATE&onlylendable=yes" >

就是想拿到1036那个值~~不太会用~~谢谢啊

[解决办法]

JScript code
$(document).ready( function() {    $("#researchdl b font").each( function() {        alert($(this).text());    });});
[解决办法]
HTML code
<script src="http://code.jquery.com/jquery-latest.js"></script><dl id="researchdl">  <dt>检索条件:题名=<font color="red">经济</font> </font> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;结果数:<b><font color="red">1036</font></b>    &nbsp;&nbsp;<a target="_blank" href="search_rss.php?location=ALL&title=%E7%BB%8F%E6%B5%8E&doctype=ALL&lang_code=ALL&match_flag=forward&displaypg=20&showmode=list&orderby=DESC&use_flag=3&sort=CATA_DATE&onlylendable=yes"><img src="../tpl/red/images/rss.gif" alt="此检索条件下的结果RSS源" border="0" /></a>  &nbsp;&nbsp;<b><a href="?location=ALL&title=%E7%BB%8F%E6%B5%8E&doctype=ALL&lang_code=ALL&match_flag=forward&displaypg=20&showmode=list&orderby=DESC&use_flag=3&sort=CATA_DATE&onlylendable=yes" ><script>    alert( $('#researchdl b font').html() )</script> 

热点排行