cthulhu/test/html/clickable-text-change.html

17 lines
333 B
HTML
Raw Permalink Normal View History

<html>
<head></head>
<body>
<script type="text/javascript">
function changeText(e) {
if(e.textContent == "Hello")
e.textContent = "Goodbye cruel";
else
e.textContent = "Hello";
}
</script>
<div>Line 1</div>
<div><span onclick="changeText(this)">Hello</span> world!</div>
<div>Line 3</div>
</body>
</html>