Exercise 10.7
This commit is contained in:
@@ -0,0 +1,17 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>JS Tester</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div>
|
||||||
|
<button onclick="message(this)">Button 1</button>
|
||||||
|
<button onclick="message(this)">Button 2</button>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
function message(el) {
|
||||||
|
console.dir(el.textContent);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user