This repository has been archived by the owner on May 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtml_tester.html
62 lines (57 loc) · 1.6 KB
/
html_tester.html
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Quick 'n' easy HTML rendering, pop HTML output in this form
to parse it. -->
<head>
<title>XHTML Tester</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<style media="screen" type="text/css">
body {
font-family: sans-serif;
font-size: 1.1em;
}
input[type="button"], input[type="reset"] {
width: 150px;
padding: 10px;
}
#html_in {
width: 100%;
}
.centre {
text-align: center;
}
</style>
<script type="text/javascript">
function setContent(){
var content = document.getElementById("html_in").value;
document.getElementById("html_content").innerHTML = content;
}
function clean(sub) {
var content = document.getElementById("html_in").value;
clean_content = content.replace(sub, "");
document.getElementById("html_in").value = clean_content;
}
</script>
</head>
<body>
<div>
<form action="">
<div class="centre">
<input type="button" onclick="setContent()" value="Test!" />
<input type="button" onclick="clean(/\\n/g)" value="Clean \n" />
<input type="reset" value="Clear" />
</div>
<div>
<textarea id="html_in" rows="15" cols="150" ></textarea>
</div>
</form>
<hr />
<div id="html_content">
<p style="text-align:center;">Type above to try HTML content.</p>
</div>
<hr />
<p class="centre">- page end -</p>
</div>
</body>
</html>