Home | Ajax | BioInformatics | Dojo | EAI | EJB | Hibernate | J2ME | Java | Java Glossary | Java Servlets | JavaScript | Jboss | JDBC | JDO | Jmeter | JSF | JSP | JUnit | Maven | MySQL | Spring Framework | SQL | Struts | Technology | WAP | Web Services | XML
 
 
Search All Tutorials
  

 
Programming Tutorials: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML
 
JavaScript
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments

Java Script With Links and Images

                         

In this article you learn the basics of JavaScript and create your first JavaScript program.

JavaScript Images
The JavaScript image gallery making of Pictures should be quick process. The gap between snapping some pictures and published on the web ought to be a short one. Here’s a quick and easy way of making a one-page gallery that uses JavaScript to the load images and their captions on the fly.
The identify areas of the HTML document that need to be edited to create JavaScript image swapping. 
The JavaScript Describe the difference between the mouse enter events and mouse exit events. 
JavaScript write the code that will hide the scripts if  viewer's browser does not support this feature. 

Example:

<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!--
if (document.images)
 {
var pum1 = new Image();
pum1.src = "pussycatdolls_beep.jpg";
var pum2 = new Image();
pum2.src = "AlexanderHaneng_big.jpg";
}

function show_rock()
 {
if (document.images)
 {
document["pum"].src = pum2.src;
}
}
function hide_rock() 
{
if (document.images)
 {
document["pum"].src = pum1.src;
}

//-->
</SCRIPT>
</head>
<body>
<a href="ram.html"
onClick="alert('Move the mouse over the rock to see a magnified view.'); 
return false" 
onMouseOver="show_rock(); window.status='description of explosiveness scale'; 
return true" 
onMouseOut="hide_rock()">
<IMG SRC="pussycatdolls_beep.jpg" align=right ALT="picture of pumice" 
WIDTH="220" HEIGHT="170" hspace=12 vspace=12 name="pum" border=0></a>
</body>
</html>

When the mouse cursor  over a link (the default image, in this case black) then changes to display a second image in this place.
 

JavaScript Links
JavaScript is the one of the more comman on the web today .JavaScript is the image roll over and con be done with the link as very easy and con be done easy images.

Example:

<html>
<body bgcolor="#FFFFFF">
<title>online.net</title>
<script language="JavaScript">
function image_over(image_name)
{
image_name.src = "images/green.gif"
}
function image_out(image_name)
{
image_name.src = "images/red.gif"
}
</script>
<img name="image1" src="images/red.gif" border=0> 
<a href="http://www.roseindia.net/" 
onmouseover="image_over(image1)" onmouseout="image_out(image1)">online.net</A>
</body>
</html> 

 

                         

Facing Programming Problem?
Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

0 comments so far (post your own) View All Comments Latest 10 Comments:

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Java String toLowerCase Example
Java String toCharArray Example
Java String substring Example
Java String indexOf Example
Java String startsWith Example
Java String hashCode Example
Java String matches Example
Java String length Example
Java String lastIndexOf Example
Java String isEmpty Example
Java String equalsIgnoreCase Example
Java String equals Example
Java String endsWith Example
Java String copyValueOf Example
Java String contentEquals Example
  EAI Articles
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.