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

Javascript Programs

This document has more than one 'JavaScript' programs either from JavaScript & JScript by James Jaworski or inspired by this book: Namely: -Javascript 'Hyperlink' -Conversion between types, Quotes, Formatting characters -Creating HTML Tag -Number Types -Types of arrays

Uploaded by

Syed Arbab Ahmed
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
365 views

Javascript Programs

This document has more than one 'JavaScript' programs either from JavaScript & JScript by James Jaworski or inspired by this book: Namely: -Javascript 'Hyperlink' -Conversion between types, Quotes, Formatting characters -Creating HTML Tag -Number Types -Types of arrays

Uploaded by

Syed Arbab Ahmed
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 6

***Few JavaScript program from or inspired by JavaScript and Jscript book of James Jaworski *** 1- <html> <head> <title>Heading,

Paragraph, Variable & hyperlink of page 9 of JavaScript by James Jaworski </title> <script language="Javascript"> document.write ("<H1> First Heading </H1>") </script> <body><!-- This is comment --> <h1>Second Heading</h1> <p>First Paragraph</p> <script> /* var a = prompt ("Enter Your Name"); document.write ("My Name: "+a); document.write ("<P> Second Paragraph</P>") */ </script> <a href="http://www.google.com">Click here for webpage</a> <a href="E:\">Click here to navigate to a specified location</a> </body> </html> *-*-*-*-* 2- <html> <head>

<title> JavaScript 'Hyperlink' of page 43 of JavaScript by James Jaworski </title> <script language ="JavaScript"> </script> </head> <body> <a href="http://www.google.com">Click Hyperlink to open website</a> <a href ="&amp;(linkTo);" ></a> </body> </html> *-*-*-*-* 3- <html> <head> <title>Conversion between types, Quotes, Formatting characters of page 57 of JavaScript by James Jaworski </title> </head> <body> <script language ="JavaScript"> document.write("true*5+false*7=") document.write(true*5+false*7) /*document.write("Use backslash for double quote \" Hmmmm... \"") document.write("<BR>") document.write("<BR>") document.write(eval ("12.34*10"))*/ </script> </body>

</html> *-*-*-*-* 4- <html> <head> <title> Creating HTML Tag of page 47 of JavaScript by James Jaworski </title> <script LANGUAGE ="JavaScript"> greeting = "<H1> Hi </H1>" welcome = "<P> Welcome</p>" </script> </head> <body> <script LANGUAGE ="JavaScript"> document.write(greeting) document.write(welcome) </script> </body> </html>

*-*-*-*-* 5- <html> <head> <title>Number Types of page 54 of JavaScript by James Jaworski </title> </head> <body>

<script language ="JavaScript"> document.write("0xab0 + 0xcd =") document.write(0xab0 + 0xcd) document.write("<BR>") document.write("<BR>") document.write("<BR>") document.write (-4.321e18) </script> </body> </html> *-*-*-*-* 6- <html> <head> <title>Different Types of arrays of page 70 of JavaScript by James Jaworski</title> </head> <body> <script language ="JavaScript"> /* employee = new Array(2) employee [0] = 'Bill' employee [1] = 'Bo' document.write(employee [0]+"<br>") document.write(employee [1]+"<br>") Line 16*/ //Extending length of array order = new Array() document.write("order.length = "+order.length+"<br> <br>") order [999]= "Check" document.write("order.length ="+order.length)

</script> </body> </html> *-*-*-*-* Frames *-*-*-*-* /* Frames in JavaScript */ /* 1st frame code http://www.pageresource.com/html/frame1.htm */ <HTML> <HEAD> <TITLE>JavaScript Example 13</TITLE> </HEAD> <BODY> <FORM> <INPUT type="button" value="What is cool?" onClick="parent.right_frame.document.form1.text1.value='Me!'"> </FORM> </BODY> </HTML> /* 2nd frame code */ <HTML> <HEAD> <TITLE>JavaScript Example 14</TITLE> </HEAD> <BODY> <FORM name="form1"> <INPUT type="text" name="text1" size="25" value=""> </FORM> </BODY> </HTML> /* Merger of the 2 above frames */ <HTML> <HEAD> <TITLE>Frames Values http://www.pageresource.com/jscript/jframe1.htm</TITLE> </HEAD> <FRAMESET cols="20%,80%"> <FRAME SRC="1.html" name="left_frame"> <FRAME SRC="2.html" name="right_frame"> </FRAMESET> </HTML>

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy