summaryrefslogtreecommitdiffstats
path: root/dom/tests/js/clone.html
blob: a99f3f38d7fb8d9932862c0dc06d7ccffc683edf (plain)
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
<HTML>
<HEAD>
<TITLE>Clone test</TITLE>
<SCRIPT>
function clonePara()
{
  var p = document.getElementsByTagName("P")[0];
  var newp = p.cloneNode(true);
  
  document.body.appendChild(newp);
}
</SCRIPT>
</HEAD>
<BODY>
<H1>Clone test</H1>

<P>If you press the button <B>below</B>, this paragraph and the
image <IMG SRC="flamer.gif"> will be <FONT SIZE=+3>cloned</FONT>.
If you see an <I>exact</I> copy of this paragraph, the test
succeeded.</P>

<FORM>
<INPUT TYPE="button" NAME="clone" VALUE="Clone" onClick="clonePara();">
</FORM>
</BODY>
</HTML>