blob: c1612e8a9d15d6d9ff487e2089753d9fda1900f5 (
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
27
28
29
|
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript">
function boom()
{
var st = document.getElementById("s").firstChild
var range = document.createRange();
range.setStart(document.documentElement, 0);
range.setEnd(st, 1);
range.deleteContents()
try { range.surroundContents(st); } catch(e) { }
}
</script>
<style type="text/css">
div:first-letter { float: left; }
</style>
</head>
<body onload="boom();"><div><span id="s">Foo</span></div></body>
</html>
|