mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-06 23:44:43 -04:00
20 lines
428 B
HTML
20 lines
428 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<body>
|
|
|
|
<h2 class="example">A heading with class="example"</h2>
|
|
<p class="example">A paragraph with class="example".</p>
|
|
|
|
<p>Click the button to add a background color to the first element in the document with class="example".</p>
|
|
|
|
<button onclick="myFunction()">Try it</button>
|
|
|
|
<script>
|
|
function myFunction() {
|
|
window.alert(document.querySelector(".example").innerHTML);
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|