• Post Reply Bookmark Topic Watch Topic
  • New Topic

span tag issue in javascript

 
pramod talekar
Ranch Hand
Posts: 367
Eclipse IDE Java Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 :-

 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 367
Eclipse IDE Java Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Eric for your advice.

I'll look for more details on label elements.

Thanks for improvement.
 
Always look on the bright side of life. At least this ad is really tiny:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!