Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
Javascript- Functions
A function is a group of reusable code which can be called
anywhere in your program. This stops the ...
Copy the following code into
dreamweaver
<head> <script type="text/javascript">
function sayHello() {
alert("Hello World")...
When you click on the link, it
presents an alert box
Click inside the input type and press spacebar
on your keyboard, a selection should appear,
choose onmouseover.
Click inside the input type and press spacebar
on your keyboard, a selection should appear,
choose onmouseover.
Enter the following=>
onmouseover=alert("hello")
*click on liveview at the top of dreamweaver and
see what happens.
Javascript: for Loop
the for loop makes a list of code copy over and over.
Open a new html page and copy the following int...
Nächste SlideShare
Wird geladen in …5
×

Loops

5.594 Aufrufe

Veröffentlicht am

esfdefdsfdf

Veröffentlicht in: Karriere
  • Als Erste(r) kommentieren

  • Gehören Sie zu den Ersten, denen das gefällt!

Loops

  1. 1. Javascript- Functions A function is a group of reusable code which can be called anywhere in your program. This stops the need of writing the same code again and again.
  2. 2. Copy the following code into dreamweaver <head> <script type="text/javascript"> function sayHello() { alert("Hello World") } </script> </head> <body> <input type="button" onclick="sayHello()" value="Say Hello" /> </body>
  3. 3. When you click on the link, it presents an alert box
  4. 4. Click inside the input type and press spacebar on your keyboard, a selection should appear, choose onmouseover.
  5. 5. Click inside the input type and press spacebar on your keyboard, a selection should appear, choose onmouseover.
  6. 6. Enter the following=> onmouseover=alert("hello") *click on liveview at the top of dreamweaver and see what happens.
  7. 7. Javascript: for Loop the for loop makes a list of code copy over and over. Open a new html page and copy the following into the body tag- <script type="text/javascript"> var bodyslam= prompt("enter a number"); bodyslam= parseFloat(bodyslam); if (bodyslam>= 200){ for(bodyslam=5;bodyslam<=5000000;bodyslam=bodyslam+30) document.write("<PRE>hello </PRE> "); } else { alert("not a high enough number, sorry") } </script> The value to enter How many times it repeats

×