javascript 时钟问题
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档 </title>
<style type="text/css">
input{
font-size:24px;
border-style:none;
background:#ff8b3b;
}
</style>
<script language="javascript">
function time()
{
var time=new Date();
var apm;
var year=time.getYear();
var month=time.getMonth()+1;
var date=time.getDate();
var weekday=0;
switch(time.getDay())
{
case 0:
weekday="星期日";
break;
case 1:
weekday="星期一";
break;
case 2:
weekday="星期二";
break;
case 3:
weekday="星期三";
break;
case 4:
weekday="星期四";
break;
case 5:
weekday="星期五";
break;
case 6:
weekday="星期六";
break;
}
var hour=time.getHours();
var minute=time.getMinutes();
var second=time.getSeconds();
if(minute <10)
minute="0"+minute;
if(second <10)
second="0"+second;
document.form1.myclock.value=hour+&q
相关问答:
比如有一个textbox,用户输入后点button按钮时,实现用JavaScript对textbox输入信息的验证,比如验证用户输入的是否是数字。
希望将HTML代码一并写出来哈,谢谢。
HTML code:
<!DOCTYPE html PUBLIC &quo ......
JScript code:
<form id="myform" name="myform">
<input type='hidden' name='maxp' value='6'></input>
<input type='text' id='pageinput' onkeydown="if(e ......
<script language="javascript">
function printdate(){
var now=new Date();
var year=now.getYear();
var month=now.getMonth();
&n ......
如题.我在服务器端循环了一下取值.(.aspx.cs代码)
DataTable dt = Connect.BindTable("SELECT SiteNo, longitude from Info");
if ......