Jump to content

[RESOLVED] javascript question


cinek

Recommended Posts

  • Management
Link to comment
Share on other sites


It's a simple javascript place the code below were you want it

 

<script type="text/javascript">
<!--
var currentTime = new Date()
var month = currentTime.getMonth() + 1
var day = currentTime.getDate()
var year = currentTime.getFullYear()
document.write(day + "/" + month + "/" + year)
//-->
</script>

Link to comment
Share on other sites


thanks :lol: what if i want to save this in another file (*.js)? how can I import it to my index.html ?

 

I tried the

 

<script type="text/javascript" src="date.js"></script>

 

but it doesn't show :)

Edited by cinek
Link to comment
Share on other sites


yeah ya can do that open notepad and copy the following

 

Copy & Paste

 

var currentTime = new Date()
var month = currentTime.getMonth() + 1
var day = currentTime.getDate()
var year = currentTime.getFullYear()
document.write(day + "/" + month + "/" + year)

 

File Save As date.js

 

Upload and just

 

Place

 

<script type="text/javascript" src="date.js"></script>

 

were u want it :lol: enjoy

Link to comment
Share on other sites


  • Management

The issue/request this topic was opened for has now been resolved. If you need further assistance, please open a new topic.

 

If this topic was closed prematurely, please contact me so I can re-open it. :lol:

 

 

Topic Closed

Board Rules - Available Products - Need a Custom Work?

 

< Don't PM me for support, post in the forum or submit a ticket from the client area instead! >

Link to comment
Share on other sites


Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.