wmi-parprog/05_html_jQuery/web6.html

27 lines
459 B
HTML
Raw Normal View History

2024-04-04 12:11:34 +02:00
<html>
<body>
<h1 class="mainh">Hi there!</h1>
<h1 class="sech">Hi there! 2222</h1>
<button onclick="$('h1.mainh').addClass('green');">
Make Green
</button>
</body>
<script>
a = 9;
if (a == 19)
alert('abc' + a);
alert($('h1.sech').html());
$('h1.sech').html('NEW header');
$('h1').each(function(index, obj) {
alert(index);
alert($(obj).html());
});
</script>
</html>