'Added web4.html'
This commit is contained in:
parent
2ac8ee51cd
commit
946da74870
29
05_html_jQuery/web4.html
Normal file
29
05_html_jQuery/web4.html
Normal file
@ -0,0 +1,29 @@
|
||||
<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>
|
Loading…
Reference in New Issue
Block a user