<table class="text">
<tr class="li1"><td class="ln"><pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 函数 },false); }else if(document.attachEvent) { //IE document.attachEvent('onreadystatechange',function() { if(document.readyState == 'complete') { document.detachEvent('onreadystatechange',arguments.callee); fn(); //函数执行 } }); } }; 方式二: function fn(){ var oId = document.getElementById('id'); var html = oDiv.innerHTML; oId.onclick = function () { console.log(html); }; oId = null; //释放 } 原文链接:https://www.f2er.com/note/421548.html