自动日期输入

来源:互联网 发布:mac android 文件传输 编辑:程序博客网 时间:2024/04/19 12:12
<script type="text/javascript"><!--google_ad_client = "pub-4490194096475053";/* 内容页,300x250,第一屏 */google_ad_slot = "3685991503";google_ad_width = 300;google_ad_height = 250;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<!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>

<title>自动时间输入</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="title" content="" />
<meta name="author" content="" />
<meta name="subject" content="" />

<meta name="language" content="en" />
<meta name="keywords" content="" />

</head>

<body>
<script language="JavaScript" type="text/javascript" src="time.js"></script>
  <!--上面的代码 js存为一个文件 .js 然后在属性里设置一下-->
  <!-- today 表示 是不是自动写入当天日期-->
  <!-- check 表示 是不是检测输入的时间是否符合要求-->

  明天出发:<input type='text' today="+1" auto=true checktime=true> 试试:清空,输入一个2就知道了
<br/>
  三天回来:<input type='text' today="+4" auto=true checktime=true> 试试:输入2 会变成2006-




</body>

</html>
原创粉丝点击