blob: 66832a03e5d057715d9b98d4180d09870ac38462 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div id=clicky style="background-color: red; color: white; border: 1px solid black;">Click me</div>
<div id="foo">This has <b>some HTML</b> inside it!</div>
<script type="text/javascript">
function hax() {
var foo = document.getElementById("foo");
console.log("trying");
foo.innerHTML = 'But now the HTML has changed!';
}
document.getElementById("clicky").addEventListener("mousedown", hax);
</script>
</body>
</html>
|