29 lines
550 B
HTML
29 lines
550 B
HTML
<html>
|
|
|
|
<header>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
|
|
</header>
|
|
|
|
<body>
|
|
<h1>IMPORTANT TITLE <b>BOLD</b></h1>
|
|
<h1 id="abc">TITLE 2</h1>
|
|
<h1 class="c1">TITLE 3</h1>
|
|
</body>
|
|
|
|
<script>
|
|
alert('Hello');
|
|
|
|
alert($('h1').html());
|
|
alert($('#abc').text());
|
|
alert($('.c1').text());
|
|
|
|
$('.c1').html('NEW TITLE');
|
|
|
|
$("h1").each(function(index) {
|
|
alert(index + ": " + $(this).text());
|
|
});
|
|
|
|
$('#abc').remove();
|
|
</script>
|
|
|
|
</html> |