SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
-
Jul 2, 2001, 10:02 #1
- Join Date
- Jul 2001
- Location
- Poland/ Warsaw
- Posts
- 111
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Problem with document.write in HEAD section...
I have something like this:
<html><head>
<title>::: js step one ::/title>
<script language="javascript">function myfunc(xxx)
{
document.write(xxx)
};
</SCRIPT>
</head><body>
<a HREF onclick="myfunc('HAHA')">Click here</A>
</body></html>
When I click on the "Click here" the "HAHA" is showing but the html code disapears... What's wrong???
-
Jul 2, 2001, 13:55 #2
- Join Date
- Sep 2000
- Posts
- 230
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
document.write
---If invoked while the page loads it can add to the current content.
---If invoked after the page loads how you want it to, it clears the current document and writes the content into the window.
-
Jul 2, 2001, 14:04 #3
- Join Date
- Jul 2001
- Location
- Poland/ Warsaw
- Posts
- 111
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
hmmm, so what should I do? I would like to change the css link (<LINK REL="stylesheet" HREF="file.css" TYPE="text/css">) with one click and without page reloading...
-
Jul 2, 2001, 15:44 #4
- Join Date
- Jul 2001
- Location
- Poland/ Warsaw
- Posts
- 111
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
ok, i found http://www.jsr.communitech.net/changecss.htm
but is there any simplest method to do this (without adding id to css href)???
Bookmarks