日期:2014-05-16 浏览次数:20435 次
<html>
<head>
  <title>无标题页</title>
</head>
<body>
  <form id="form1" runat="server">
   
  <a href="http://paper.wenweipo.com/2012/05/16/CH1205160004.htm" >高亮1</a>
   
  <a href="http://paper.wenweipo.com/2012/05/16/CH12051655555504.htm" >高亮2</a>
   
  <a href="http://paper.wenweipo.com/2012/05/16/CH120516666666604.htm" >高亮3</a>
  </form>
        <script>
            function $(el){
                return typeof el == 'string' ? document.getElementById(el) : el;
            }
            function $t(name, cot){
                cot = cot || document;
                return cot.getElementsByTagName(name);
            }
            var s = 'http://paper.wenweipo.com/2012/05/16/.+.htm';
            var r = new RegExp(s);
            var objs = $t('a', $('form1'));
            for( var i = 0, len = objs.length; i < len; i++){
                if( r.test(objs[i].href) ){
                    objs[i].innerHTML = '<span style="color:red;">'+objs[i].innerHTML+'</span>';
                }
            }
            
            
            
        </script>  
</body>