27 lines
459 B
HTML
27 lines
459 B
HTML
|
<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>
|