forked from voloko/learn_js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunner.html
More file actions
42 lines (38 loc) · 1.24 KB
/
runner.html
File metadata and controls
42 lines (38 loc) · 1.24 KB
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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>js runner</title>
</head>
<body id="runner" onload="">
<div id="log" style="white-space: pre; text-align: left; font-family: monospace"></div>
<style type="text/css" media="screen">
.h {
font-weight: bold;
}
</style>
<script type="text/javascript" charset="utf-8">
(function() {
var log = document.getElementById('log');
var slice = [].slice;
if (!window.console) {
window.console = { log: function() {} };
}
function print() {
var value = slice.call(arguments).join('');
log.innerHTML += (value || '') + '\n';
console.log.apply(console, arguments);
}
function h() {
var value = slice.call(arguments).join('\n');
log.innerHTML += '\n<span class="h">' + (value || '') + '</span>\n';
console.log('\n' + value);
}
window.print = print;
window.h = h;
})();
</script>
<!-- change the src in this script -->
<script src="basics/01_variables.js" type="text/javascript" charset="utf-8"></script>
</body>
</html>