Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Web Design, HTML And CSS Forums (http://www.go4expert.com/forums/web-design-forum/)
-   -   JS in XHTML (http://www.go4expert.com/forums/js-in-xhtml-t7209/)

gameyharp 6Nov2007 19:04

JS in XHTML
 
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.

pradeep 8Nov2007 10:17

Re: JS in XHTML
 
This should help http://www.comptechdoc.org/independe...htmlxhtml.html


All times are GMT +5.5. The time now is 08:17.