可以试试遍历该对象的Attributes来获得!

解决方案 »

  1.   

    参考:
    <SCRIPT>
    function fnFind(){
    for(var i=0;i<oList.attributes.length;i++){
    if(oList.attributes[i].specified){
    alert(oList.attributes[i].nodeName + " = "
    + oList.attributes[i].nodeValue);
    }
    }
    }
    </SCRIPT>
    <UL onclick="fnFind()">
    <LI ID = "oList" ACCESSKEY = "L">列表项目 1
    </UL>
      

  2.   

    var a='<div id="aaa" style="top:10;left10">10000000个字在这里</div>'
    var ddd=/(<[^>]*?>)/
    ddd.test(a)
    alert(RegExp.$1)
      

  3.   

    mingxuan3000(铭轩)兄,要注意兼容性,outerHTML Only For IE,所以用正则来匹配貌似不妥!
      

  4.   

    用parentNode.innerText来replace掉那个outerHTML。
    可能也只有这种方法了。我找了好长时间才找到这个。