ladybird/Base/res/html/misc/innerHTML.html

17 lines
475 B
HTML

<!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>