wmi-parprog/05_html_jQuery/web2.html
2024-03-25 15:56:30 +01:00

26 lines
472 B
HTML

<html>
<header>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
</header>
<body>
<h1 class="first">TITLE</h1>
<h1 class="second">TITLE SECOND</h1>
</body>
<script type="text/javascript">
alert('Hello');
alert($('h1.second').html());
$('h1.first').html('CHANGED');
$( "h1" ).each(function( index ) {
alert( index + ": " + $( this ).text() );
});
</script>
</html>