Jump to content

onload in body tag


Matpatnik

Recommended Posts

Hi guys,While I was studying the JavaScrip i find this on your website: http://www.w3schools.com/jsref/jsref_onload.asp One of the exemple show in there, is inside a body tag which xhtml doesn't support.How should I write it?

<body>    <onload="load()" />

I'm beganing with xhtml and I'm trying to convert my old htmlThank you for your help :) Mat

Link to comment
Share on other sites

<html><head>  <title>some title</title>  <script type="text/javascript">      onload=      function someFunctionName()      {           //do something       }  </script><body></body></html>

this is the same as <body onload="someFunctionName()">

Link to comment
Share on other sites

  • 5 months later...

Good Morning I'm new to this forum and I'm hoping that I can get some help.I'm trying to add either a countDown function or a setTimeout function to make some software that I made into a 30 day trial. At the end of the 30 day period the software will direct you to awebpageI'm a hairstylist and I've developed software that will calculate a hair color formula.I've tried some of the examples located here but with no luck. I'm new to JS and HTML so please excuse my ignorance on some of these issues.Any ideas?Marc :)

Link to comment
Share on other sites

Why dont you start a new topic??

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...