SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: js source file
-
Jun 15, 2003, 03:01 #1
- Join Date
- Apr 2002
- Posts
- 48
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
js source file
i have just started to create a global js source file and i was wondering how i could include a global copyright tag.
i.e
http://northerndescent.wired-hub.net/temp/test.html
the random image use (on page refresh) can be printed to display "img/img1.jpg img/img3.jpg "
i was wondering if anyone knows how to declare stuff in the source file like
var copyright= copyright team nd 2003
and the in the pages
<script language="JavaScript">
document.writeln('<TD'+'>'+copyright+'<'+'/TD>');
</script>
^ i know the above doesn't work but i have a limted knowledge of js as i am learning it as i go along.
i hope i made sense
-
Jun 15, 2003, 04:05 #2
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
This works for me:
Code:<script language="JavaScript" type='text/javascript'> var copyright = 'copyright team nd 2003'; document.writeln('<td>'+copyright+'</td>'); </script>
Hello World
-
Jun 15, 2003, 06:44 #3
- Join Date
- Apr 2002
- Posts
- 48
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
it worked
thanks doug
Bookmarks