17 lines
333 B
HTML
17 lines
333 B
HTML
|
<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>
|