0% found this document useful (0 votes)
11 views

Css Exp 9 PDF Updated Tuesday

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Css Exp 9 PDF Updated Tuesday

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Name: Ansari Abdullah Roll no: 220402

Sub: Client-Side Scripting (CSS) Branch: CO

Experiment No. 9: Create a webpage using Intrinsic Java Functions


▪ Write a program to perform various Intrinsic functions

CODE:
<html>
<head>
<title> Exp 9_1 </title>
<script>
var a=parseInt("0x10");
var b=parseFloat("1.5");
document.write("a= "+a+"<br>");
document.write("b= "+b+"<br>");
var x=Number(true);
document.write("x= "+x+"<br>");
var n=-8.2;
var abs=Math.abs(n);
var round=Math.round(n);
var square=Math.sqrt(27);
var floor=Math.floor(n);
var ceil=Math.ceil(n);
var power=Math.pow(64,4);
document.write("Absolute= "+abs+"<br>");
document.write("Round= "+round+"<br>");
document.write("Square= "+square+"<br>");
document.write("Floor= "+floor+"<br>");
document.write("Ceil= "+ceil+"<br>");
document.write("Power= "+power+"<hr>");
document.write("220402-Ansari Abdullah");
</script>
</head>
</html>

OUTPUT:
▪ Write a program to convert the string to number using different function

CODE:
<html>
<head>
<title> Exp 9_2 </title>
<script>
var a=parseInt("0x10");
var b=parseInt("10.6");
var c=parseFloat("1.5");
var d=parseFloat(" 12 ");
var x=Number(true);
document.write("a= "+a+"<br>");
document.write("b= "+b+"<br>");
document.write("c= "+c+"<br>");
document.write("d= "+d+"<br>");
document.write("x= "+x+"<hr>");
document.write("220402-Ansari Abdullah");
</script>
</head>
</html>

OUTPUT:

You might also like