1.ASP页面显示时间格式
2.网页时间代码
3.layui 怎么设置 输入框可以输入时分秒?
4.invaildateåºè¯¥å¨ä»ä¹è°ç¨
ASP页面显示时间格式
如果只是在asp页面显示的话,根本就不用asp代码,展示系统 asp源码java代码完全可以解决~
你用百度搜索关键字 网页特效代码 就可以了~一般会有个关于时间的影视美化源码分类~里边有各种各样的时间代码,将代码直接嵌入网页源代码中就可以了~一般都是厨师网站源码JavaScript写成的~
比如:
<script>setInterval("linkweb.innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt(new Date().getDay());",);
</script>
或者:
<SCRIPT language=JavaScript>
//clock
dCol='';//date colour.
fCol='FF';//face colour.
sCol='';//seconds colour.
mCol='';//minutes colour.
hCol='';//hours colour.
ClockHeight=;
ClockWidth=;
ClockFromMouseY=0;
ClockFromMouseX=;
//Alter nothing below! Alignments will be lost!
d=new Array("SUNDAY","MONDAY","TUESDAY","WEDNSEDAY","THURSDAY","FRIDAY","SATURDAY");
m=new Array("JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER");
date=new Date();
day=date.getDate();
year=date.getYear();
if (year < ) year=year+;
TodaysDate=" "+d[date.getDay()]+" "+day+" "+m[date.getMonth()]+" "+year;
D=TodaysDate.split('');
H='...';
H=H.split('');
M='....';
M=M.split('');
S='.....';
S=S.split('');
Face='1 2 3 4 5 6 7 8 9 ';
font='Arial';
size=1;
speed=0.6;
ns=(document.layers);
ie=(document.all);
Face=Face.split(' ');
n=Face.length;
a=size*;
//ymouse=0;
//xmouse=0;
ymouse=;
xmouse=;
scrll=0;
props="<font face="+font+" size="+size+" color="+fCol+"><B>";
props2="<font face="+font+" size="+size+" color="+dCol+"><B>";
Split=/n;
Dsplit=/D.length;
HandHeight=ClockHeight/4.5
HandWidth=ClockWidth/4.5
HandY=-7;
HandX=-2.5;
scrll=0;
step=0.;
currStep=0;
y=new Array();x=new Array();Y=new Array();X=new Array();
for (i=0; i < n; i++){ y[i]=0;x[i]=0;Y[i]=0;X[i]=0}
Dy=new Array();Dx=new Array();DY=new Array();DX=new Array();
for (i=0; i < D.length; i++){ Dy[i]=0;Dx[i]=0;DY[i]=0;DX[i]=0}
if (ns){
for (i=0; i < D.length; i++)
document.write('<layer name="nsDate'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props2+D[i]+'</font></center></layer>');
for (i=0; i < n; i++)
document.write('<layer name="nsFace'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props+Face[i]+'</font></center></layer>');
for (i=0; i < S.length; i++)
document.write('<layer name=nsSeconds'+i+' top=0 left=0 width= height=><font face=Arial size=3 color='+sCol+'><center><b>'+S[i]+'</b></center></font></layer>');
for (i=0; i < M.length; i++)
document.write('<layer name=nsMinutes'+i+' top=0 left=0 width= height=><font face=Arial size=3 color='+mCol+'><center><b>'+M[i]+'</b></center></font></layer>');
for (i=0; i < H.length; i++)
document.write('<layer name=nsHours'+i+' top=0 left=0 width= height=><font face=Arial size=3 color='+hCol+'><center><b>'+H[i]+'</b></center></font></layer>');
}
if (ie){
document.write('<div id="Od" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < D.length; i++)
document.write('<div id="ieDate" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props2+D[i]+'</B></font></div>');
document.write('</div></div>');
document.write('<div id="Of" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < n; i++)
document.write('<div id="ieFace" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props+Face[i]+'</B></font></div>');
document.write('</div></div>');
document.write('<div id="Oh" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < H.length; i++)
document.write('<div id="ieHours" style="position:absolute;width:px;height:px;font-family:Arial;font-size:px;color:'+hCol+';text-align:center;font-weight:bold">'+H[i]+'</div>');
document.write('</div></div>');
document.write('<div id="Om" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < M.length; i++)
document.write('<div id="ieMinutes" style="position:absolute;width:px;height:px;font-family:Arial;font-size:px;color:'+mCol+';text-align:center;font-weight:bold">'+M[i]+'</div>');
document.write('</div></div>')
document.write('<div id="Os" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < S.length; i++)
document.write('<div id="ieSeconds" style="position:absolute;width:px;height:px;font-family:Arial;font-size:px;color:'+sCol+';text-align:center;font-weight:bold">'+S[i]+'</div>');
document.write('</div></div>')
}
// (ns)?window.captureEvents(Event.MOUSEMOVE):0;
//function Mouse(evnt){
// ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY;
// xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX;
//}
//(ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
function ClockAndAssign(){
time = new Date ();
secs = time.getSeconds();
sec = -1. + Math.PI * secs/;
mins = time.getMinutes();
min = -1. + Math.PI * mins/;
hr = time.getHours();
hrs = -1. + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/;
if (ie){
Od.style.top=window.document.body.scrollTop;
Of.style.top=window.document.body.scrollTop;
Oh.style.top=window.document.body.scrollTop;
Om.style.top=window.document.body.scrollTop;
Os.style.top=window.document.body.scrollTop;
}
for (i=0; i < n; i++){
var F=(ns)?document.layers['nsFace'+i]:ieFace[i].style;
F.top=y[i] + ClockHeight*Math.sin(-1. + i*Split*Math.PI/)+scrll;
F.left=x[i] + ClockWidth*Math.cos(-1. + i*Split*Math.PI/);
}
for (i=0; i < H.length; i++){
var HL=(ns)?document.layers['nsHours'+i]:ieHours[i].style;
HL.top=y[i]+HandY+(i*HandHeight)*Math.sin(hrs)+scrll;
HL.left=x[i]+HandX+(i*HandWidth)*Math.cos(hrs);
}
for (i=0; i < M.length; i++){
var ML=(ns)?document.layers['nsMinutes'+i]:ieMinutes[i].style;
ML.top=y[i]+HandY+(i*HandHeight)*Math.sin(min)+scrll;
ML.left=x[i]+HandX+(i*HandWidth)*Math.cos(min);
}
for (i=0; i < S.length; i++){
var SL=(ns)?document.layers['nsSeconds'+i]:ieSeconds[i].style;
SL.top=y[i]+HandY+(i*HandHeight)*Math.sin(sec)+scrll;
SL.left=x[i]+HandX+(i*HandWidth)*Math.cos(sec);
}
for (i=0; i < D.length; i++){
var DL=(ns)?document.layers['nsDate'+i]:ieDate[i].style;
DL.top=Dy[i] + ClockHeight*1.5*Math.sin(currStep+i*Dsplit*Math.PI/)+scrll;
DL.left=Dx[i] + ClockWidth*1.5*Math.cos(currStep+i*Dsplit*Math.PI/);
}
currStep-=step;
}
function Delay(){
scrll=(ns)?window.pageYOffset:0;
Dy[0]=Math.round(DY[0]+=((ymouse)-DY[0])*speed);
Dx[0]=Math.round(DX[0]+=((xmouse)-DX[0])*speed);
for (i=1; i < D.length; i++){
Dy[i]=Math.round(DY[i]+=(Dy[i-1]-DY[i])*speed);
Dx[i]=Math.round(DX[i]+=(Dx[i-1]-DX[i])*speed);
}
y[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed);
x[0]=Math.round(X[0]+=((xmouse)-X[0])*speed);
for (i=1; i < n; i++){
y[i]=Math.round(Y[i]+=(y[i-1]-Y[i])*speed);
x[i]=Math.round(X[i]+=(x[i-1]-X[i])*speed);
}
ClockAndAssign();
setTimeout('Delay()',);
}
if (ns||ie)window.onload=Delay;
</SCRIPT>
这只是其中的两个例子~这样的例子还有很多~
我用百度搜索出来的第一个网站就提供了很丰富的特效代码~
网页时间代码
1.年月日星期时间代码形式(年2月日 星期六 ::)
<SCRIPT language=JavaScript>
<!--
//以下是年月日星期显示
tmpDate=new Date();date=tmpDate.getDate();month=tmpDate.getMonth()+1;year=tmpDate.getYear();document.write(year);document.write(".");document.write(month);document.write(".");document.write(date);document.write(" ");myArray=new Array(6);myArray[0]="星期日 "
myArray[1]="星期一 "
myArray[2]="星期二 "
myArray[3]="星期三 "
myArray[4]="星期四 "
myArray[5]="星期五 "
myArray[6]="星期六 "
weekday=tmpDate.getDay();if(weekday==0|weekday==6)
{ document.write(myArray[weekday])
}else
{ document.write(myArray[weekday])
};
//-->
</SCRIPT>
<SCRIPT language=Javascript1.2>
<!--
//以下是时间显示
var tags_before_clock = ""
var tags_after_clock = ""
if(navigator.appName == "Netscape") {
document.write('<layer id="clock"></layer>');
}
if (navigator.appVersion.indexOf("MSIE") != -1){
document.write('<span id="clock"></span>');
}
function showclock()
{
var date = new Date();
var hour = date.getHours();
var min = date.getMinutes();
var sec = date.getSeconds();
var col = ":";
var spc = " ";
var apm;
if ( hour > )
{
apm="P.M.";
hour=hour-;
}
else
{
apm="A.M.";
}
if (hour == 0) hour=;
if (min<=9) min="0"+min;
if (sec<=9) sec="0"+sec;
if(navigator.appName == "Netscape")
{
document.clock.document.write(tags_before_clock
+hour+col+min+col+sec+spc+tags_after_clock);
document.clock.document.close();
}
if (navigator.appVersion.indexOf("MSIE") != -1)
{
clock.innerHTML = tags_before_clock+hour
+col+min+col+sec;
}
}
setInterval("showclock()",);
//-->
</SCRIPT>
2.年月日星期时间代码形式( 现在是年2月日时分秒)
<script language=Javascript>
var now=new Date()
document.write(" 现在是"+now.getYear()+"年"+(now.getMonth()+1)+"月"+now.getDate()+" 日"+now.getHours()+"时"+now.getMinutes()+"分"+now.getSeconds()+"秒")
</script>
layui 怎么设置 输入框可以输入时分秒?
参考文章:layui laydate 可以选择年月日时分秒,且默认获取layui.use(['form',价格走势 源码 'layedit', 'laydate'], function() {var form = layui.form
, layer = layui.layer
, laydate = layui.laydate;
laydate.render({
elem: '#date1', //指定元素
type:'datetime', // 可选择:年、月、Pc钱包源码日、时、分、秒
format: 'yyyy-MM-dd HH:mm:ss', //指定时间格式
value: new Date(), // 指定值
});
})
invaildateåºè¯¥å¨ä»ä¹è°ç¨
layoutSubviewsæ¹ä¾¿æ°æ®è®¡ç®ï¼drawRectæ¹ä¾¿è§å¾éç»ã
layoutSubviewså¨ä»¥ä¸æ åµä¸ä¼è¢«è°ç¨ï¼
1ãinitåå§åä¸ä¼è§¦ålayoutSubviewsã
2ãaddSubviewä¼è§¦ålayoutSubviewsã
3ã设置viewçFrameä¼è§¦ålayoutSubviewsï¼å½ç¶åææ¯frameçå¼è®¾ç½®åååçäºååã
4ãæ»å¨ä¸ä¸ªUIScrollViewä¼è§¦ålayoutSubviewsã
5ãæ转Screenä¼è§¦åç¶UIViewä¸çlayoutSubviewsäºä»¶ã
6ãæ¹åä¸ä¸ªUIView大å°çæ¶åä¹ä¼è§¦åç¶UIViewä¸çlayoutSubviewsäºä»¶ã 7ãç´æ¥è°ç¨setLayoutSubviewsã ? drawRectå¨ä»¥ä¸æ åµä¸ä¼è¢«è°ç¨ï¼
1ãå¦æå¨UIViewåå§åæ¶æ²¡æ设置rect大å°ï¼å°ç´æ¥å¯¼è´drawRectä¸è¢«èªå¨è°ç¨ãdrawRect æç¨æ¯å¨Controller->loadView,?Controller->viewDidLoad?两æ¹æ³ä¹åæç¨ç.æ以ä¸ç¨æ å¿å¨ æ§å¶å¨ä¸,è¿äºViewçdrawRectå°±å¼å§ç»äº.è¿æ ·å¯ä»¥å¨æ§å¶å¨ä¸è®¾ç½®ä¸äºå¼ç»View(å¦æè¿äºView?drawçæ¶åéè¦ç¨å°æäºåé å¼).
2ã该æ¹æ³å¨è°ç¨sizeToFitå被è°ç¨ï¼æ以å¯ä»¥å è°ç¨sizeToFit计ç®åºsizeãç¶åç³»ç»èªå¨è°ç¨drawRect:æ¹æ³ã
3ãéè¿è®¾ç½®contentModeå±æ§å¼ä¸ºUIViewContentModeRedrawãé£ä¹å°å¨æ¯æ¬¡è®¾ç½®ææ´æ¹frameçæ¶åèªå¨è°ç¨drawRect:ã
4ãç´æ¥è°ç¨setNeedsDisplayï¼æè setNeedsDisplayInRect:触ådrawRect:ï¼ä½æ¯æ个åææ¡ä»¶æ¯rectä¸è½ä¸º0ã
以ä¸1,2æ¨èï¼è3,4ä¸æå¡ ? drawRectæ¹æ³ä½¿ç¨æ³¨æç¹ï¼
1ã è¥ä½¿ç¨UIViewç»å¾ï¼åªè½å¨drawRectï¼æ¹æ³ä¸è·åç¸åºçcontextRef并ç»å¾ãå¦æå¨å ¶ä»æ¹æ³ä¸è·åå°è·åå°ä¸ä¸ªinvalidate çref并ä¸ä¸è½ç¨äºç»å¾ãdrawRectï¼æ¹æ³ä¸è½æå¨æ¾ç¤ºè°ç¨ï¼å¿ é¡»éè¿è°ç¨setNeedsDisplay?æ è ?setNeedsDisplayInRectï¼è®©ç³»ç»èªå¨è°è¯¥æ¹æ³ã
2ãè¥ä½¿ç¨calayerç»å¾ï¼åªè½å¨drawInContext:?ä¸ï¼ç±»ä¼¼äºdrawRectï¼ç»å¶ï¼æè å¨delegateä¸çç¸åºæ¹æ³ç»å¶ãåæ ·ä¹æ¯è°ç¨setNeedDisplayçé´æ¥è°ç¨ä»¥ä¸æ¹æ³
3ãè¥è¦å®æ¶ç»å¾ï¼ä¸è½ä½¿ç¨gestureRecognizerï¼åªè½ä½¿ç¨touchbegançæ¹æ³æ¥è°ç¨setNeedsDisplayå®æ¶å·æ°å±å¹