懂得放弃,才会有新的收获!

Firefox 下的 outerHTML

By weisnet On 2009-05-04 At 20:53 View:1592

假设要获取  <p id="outerID">sdfdsdfsd</p> 的 P的outerHTML

代码:

var _p = document.getElementById('outerID');

_P = _P.cloneNode();

var _DIV = document.createElement();

_DIV.appendChild(_P);

 

alert(_DIV.innerHTML); 就是P的outerHTML;

·上一篇:检测虚拟主机存放网站数
·下一篇:ajax跨域访问(cross-domain)

for this post

 
gloot Says:

firefox 下 div outerHTML;

 

Leave a Reply

首页 [1] 尾页   总共 1条记录.
请先 登陆  还没帐号

Hot Posts Powered by weiseditor

  • Add to Google

Friend links