#webtech1
Thread

semester last yr

1.a.3

1.b.1

1.b.2

2.b.1

3.a.1

Meta tag

1a 2

1.b.3

2.a.ii)
<button type="button" onclick="alert('Google Chrome!')">Click Me!</button>
<font color="red">This is some text!</font>
<script language = "JavaScript">
function handCursor(o) {
o.style.cursor='hand';
o.style.color='red';
var x = document.getElementByTag("a");
x.style.color = "red";
}
function normalCursor(o) {
o.style.color='black';
}
</script>
<a onMouseOver="handCursor(this)" onMouseOut="normalCursor(this)"
style = "color:blue">Browser Name</a>

2.a.iii)
<style>
/* Style the element with the id "myHeader" /
*#myHeader {
background-color: lightblue;
color: black;
padding: 40px;
text-align: center;
}
/* Style all elements with the class name "city" /
*.city {
background-color: tomato;
color: white;
padding: 10px;
}
</style>
<!-- A unique element -->
<h1 id="myHeader">My Cities</h1>
<!-- Multiple similar elements -->
<h2 class="city">London</h2>
<p>London is the capital of England.</p>
<h2 class="city">Paris</h2>
<p>Paris is the capital of France.</p>
<h2 class="city">Tokyo</h2>
<p>Tokyo is the capital of Japan.</p>

2b. ii.

Ajax 4

4.b.iii

3.a.i

3.b.ii)
```
var ptr points to the br node
var p_node = ptr.parentNode.parentNode;
p_title = p_node.getAttribute("title");
alert(p_title);```

3 a ii.

3a iii.
var elems = document.body.getElementsByTagName("p");
for (i of elems)
elems.documenteditor.editor.toggleTextAlignment('Justify');

4a iii.
function isNumber(str) {
isprice = /^\d*.?\d+$/;
return isprice.test( str );
}

4a i.
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript new Date()</h2>
<p>Using new Date(), creates a new date object with the current date and time:</p>
<p id="demo"></p>
<script>
var d = new Date();
document.getElementById("demo").innerHTML = d;
</script>
</body>
</html>

output:
JavaScript new Date()
Using new Date(), creates a new date object with the current date and time:
Fri Dec 20 2019 0017 GMT+0530 (India Standard Time)