1
<script>
2
function findObj(n, d) {
3
var p,i,x;
4
if(!d) d=document;
5
if((p=n.indexOf("?"))>0&&parent.frames.length){
6
d =parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
7
}
8
if(!(x=d[n])&&d.all) x=d.all[n];
9
for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
10
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
11
if(!x && document.getElementById) x=document.getElementById(n); return x;
12
}
13
function copy(ob){
14
var obj=findObj(ob);
15
if (obj) {
16
obj.select();js=obj.createTextRange();js.execCommand("Copy");
17
}
18
alert("已經(jīng)復(fù)制成功,你可以在任何地方粘貼出去了!快捷鍵: Ctrl+V ");
19
}
20
</script>
21
22
<TEXTAREA cols=80 name=text rows=22></TEXTAREA>
23
<INPUT name=select onclick=copy("text") type=button value=復(fù)制>

2


3

4

5


6

7

8

9

10

11

12

13


14

15


16

17

18

19

20

21

22

23
