26 lines
472 B
HTML
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>
|