JS in XHTML

gameyharp's Avatar
Go4Expert Member
I'm having an issue putting JS into xhtml. The tutorial i'm going through at w3schools shows all of the JS in html and not xhtml. Can someone please tell me how to convert it? Heres a little bit of what I have
HTML Code:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>simple document</title>
</head>
<body>
<script type="text/javascript">
document.write("<h1>Hello World!</h1>")
</script>
</body>
</html>
The only thing that I think i could be doing wrong is in the document declartion or w/e I shouldn't be using strict I should be using somehting else. All help is appreciated.

Last edited by shabbir; 6Nov2007 at 19:42.. Reason: Code block
0
pradeep's Avatar, Join Date: Apr 2005
Team Leader
This should help http://www.comptechdoc.org/independe...htmlxhtml.html