wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes span tag issue in javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "span tag issue in javascript" Watch "span tag issue in javascript" New topic
Author

span tag issue in javascript

pramod talekar
Ranch Hand

Joined: Apr 26, 2010
Posts: 316

Hello,

Below is my code :

If I write instead of
then as soon as I fill in "message" field , I get Alert "Hi" which is right , but after that all other fields(e.g. zip, phone) get vanished.

Is this how <span> tag should be written ?

Please advise.


This is the code :-



Thanks,
Pramod
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Span elements do not have an empty tag notation, so it should be <span></span>


On a side note: you should be using label elements



Eric
pramod talekar
Ranch Hand

Joined: Apr 26, 2010
Posts: 316

Thanks Eric for your advice.

I'll look for more details on label elements.

Thanks for improvement.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: span tag issue in javascript
 
Similar Threads
how to get the name?
Null in Javascript code
problem in regular expression
dynamically assigning help text
Help needed with DOJO and JSP