Professional Documents
Culture Documents
Practical 11 Aim
Practical 11 Aim
When a browser requests an ASP or ASP.NET file, the ASP engine reads the file, executes any
code in the file, and returns the result to the browser.
Program:
<html>
<body>
<h1>Hello Web Pages</h1>
<p>The time is @DateTime.Now</p>
</body>
</html>
Output:
Practical 12
Program:
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript in Body</h2>
<p id="demo"></p>
<script>
</script>
</body>
</html>
Output:
Practical 13
Program:
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript Operators</h2>
<p id="demo"></p>
<script>
var x = 5;
var y = 2;
var z = x + y;
document.getElementById("demo").innerHTML = z;
</script>
</body>
</html>
Output :
Practical 14
Program:
<!DOCTYPE html>
<html>
<body>
<h2>The += Operator</h2>
<p id="demo"></p>
<script>
var x = 10;
x += 5;
document.getElementById("demo").innerHTML = x;
</script>
</body>
</html>
Output:
Practical 15
Program:
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript Functions</h2>
<p>This example calls a function which performs a calculation, and returns the result:</p>
<p id="demo"></p>
<script>
return p1 * p2;}
</script>
</body>
</html>
Output: