Js dynamic time displayed on the [transfer]

2010-09-01  来源:本站原创  分类:Web  人气:155 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> Untitled document  </title>
<script type="text/javascript">
<!--
function startTime()
{
var today=new Date()
var years=today.getFullYear();
var months=today.getMonth();
var d=today.getDate()
var h=today.getHours()
var m=today.getMinutes()
var s=today.getSeconds()
// add a zero in front of numbers<10
monthsmonths=months+1
months=checkTime(months)
d=checkTime(d)
m=checkTime(m)
s=checkTime(s)
var weekday=new Array(7)
weekday[0]=" Sunday  "
weekday[1]=" Monday  "
weekday[2]="  Tuesday  "
weekday[3]=" Wednesday  "
weekday[4]=" Thursday  "
weekday[5]=" Friday  "
weekday[6]="  Saturday  "
var w=weekday[today.getDay()]
document.getElementById('ShowTime').innerHTML=years+"  Year + months + "month  "+d+" Day   "+w+" "+h+":"+m+":"+s;
t=setTimeout('startTime()',500)
}
function checkTime(i)
{
if (i<10)
  {i="0" + i}
  return i
}
-->
</script>
</head>  

<body onload="startTime()">
<div></div>
</body>
</html>
相关文章
  • Js dynamic time displayed on the [transfer] 2010-09-01

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-

  • js Dynamic regular expressions 2010-03-05

    To do the project may encounter when using js verify the correctness of form input demand, when you need to use js regular expressions. For example: For example, to verify that the month format: 'yyyy-MM', the regular expression to write very simple,

  • jquery.validate.js Introduction to the basic usage (transfer) 2010-06-21

    jquery.validate.js is a verification under jquery plugin, features more powerful, but one does not already have heard of hands used, and now is able to look up. Here is reproduced an article written by the older generation, in my own understanding of

  • js dynamic display time display time of the general wording _js 2010-12-08

    js display time dynamic display time _js the general wording of a few seconds results. not the kind of death will not move the time. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-t

  • js dynamic add table delete 2009-05-06

    <script type="text/javascript"> // Global variables var i=0; // Add the line function addMyRow(){ var mytable = document.getElementById("mybody"); var mytr = mytable.insertRow(); mytr.setAttribute("id","tr"+i)

  • How to quickly display the current page JS dynamic time 2010-10-12

    The page displays the current time is frequently used functions, there is a simple code <tr> <td colSpan=2 align=right> <font color="#cb6f00"> The current time :<span></span>  </font> <script language="

  • js dynamic input box for adding a group 2010-11-29

    <html> <head> <script type="text/javascript"> var index; index = 2; / / Add a parameter information function addParamConf () { s1 = "<input name='paramName"+index+"' dataType='Require' msg=' Parameter names ar

  • js dynamic input box to add a third method 2010-11-29

    <html> <head> <title> Untitled Document </ title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <script language="javascript"> function add () { var i = 1; option = n

  • 当json.js遇见dynamic.net烂尾篇 2014-02-03

    由于最近较忙,上一篇的坑估计要慢慢填了.感觉写文章介绍要比写程序还累啊.先看看测试程序,能够了解api支持哪些功能: static void Main(string[] args){ //wrapper对象 dynamic data = DJson.Wrap(new { name = "Jane", male = false, age = 24, dob = DateTime.Now, friend = new { name = "Jesse", male = tr

  • js control excel print perfect solution 2010-03-17

    js control excel print perfect solution Transfer from: http://hi.baidu.com/hongz1125/blog/item/0152bcfd84ce1e1008244d5c.html We all do web development problems encountered printing, print the form for the complex is really a headache, this piece of p

  • JavaScript object dynamic loading technology 2010-04-28

    What is a JavaScript object dynamic loading JavaScript dynamic loading (JavaScript Object Dynamic Loading) - The reason is called dynamic, is for there to be another form of the usual static load. JavaScript typical static loading method is through <

  • scriptaculous animation library effect.js (Principles and Use) (rpm) 2011-01-14

    scriptaculous contains the following sections: builder.js: provides a convenient way to create html elements controls.js: dynamic editing includes auto-prompts and two controls dragdrop.js: drag and drop functionality to provide elements effects.js:

  • js character ascii code-switching function 2008-08-13

    js character ascii code-switching function Character transfer ascii codes: Use charCodeAt (); ascii code brick characters: use fromCharCode (); To see a small example <script> str = "A"; code = str.charCodeAt (); str2 = String.fromCharCode

  • js operation prompt Gadgets 2010-03-12

    /* Print some operation tips [email protected] Need 1. logger.css( Or add the following to the CSS file ) .logz{position: absolute; top: 43px; left:50%; height: 18px; margin-left: -120px; text-align:left; opacity:0.7; z-index:2048;} .logi{disp

  • js code ascii character conversion functions 2010-03-16

    js code ascii character conversion functions Transfer ascii character code: use charCodeAt (); ascii character code block: use fromCharCode (); See a small example of <script> str = "A"; code = str.charCodeAt (); str2 = String.fromCharCode

  • Transfer printing Long Syria 2010-02-18

    Keyword: Transfer printing Long Syria Transfer of dye sublimation printing is dependent on the fiber and dye vapor diffusion and the role of affinity to complete the coloring effects of a printing process. Water transfer printing process is more mean

  • JS syntax dictionary 2010-06-12

    1.document.write (""); output statements 2.JS the comment is / / 3. The traditional HTML document order is: document-> html-> (head, body) Four. A browser window in the DOM order is: window-> (navigator, screen, history, location, docum

  • js manual, JS in some common helpful tips 2010-09-05

    Js in each of the tips are, but very practical! 1.document.write (""); output statements 2.JS the comment is / / 3. The traditional HTML document order is: document-> html-> (head, body) 4. A browser window in the DOM order is: window->

  • Based on the provisional dynamic jBPM4 Demand 2010-09-14

    Based on the provisional dynamic jBPM4 Demand http://www.chinaaet.com/article/index.aspx?id=22162 Abstract: This paper introduces the field of internal features of the current workflow, especially for temporary dynamic needs (countersigned, revoked,

  • HTML.JS.JSON special characters 2010-12-13

    JS to convert HTML special characters These days to do the project, found that in JSON format from the server to pass data to the client, by JS displayed in HTML pages, there are some special characters can not be directly displayed as the background