⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tryit.asp@filename=trydhtml_timeimage

📁 W3Schools tutorial..web designing
💻 ASP@FILENAME=TRYDHTML_TIMEIMAGE
字号:

<html>
<head>
<title>Tryit Editor v1.4</title>
<link rel="stylesheet" type="text/css" href="../tryittheme.css" />
<script type="text/javascript">
function displayad()
{
document.getElementById("adframe").src="../tryitbanner.asp@secid=trydhtml&rnd=" + Math.random()
}
</script>
</head>

<body>
<table cellpadding="0" cellspacing="0" width="100%" bgcolor="#808080">
<tr>
<td width="234" valign="top">
<a href="../default.htm"><img src="../images/w3default80.jpg" border="0" alt="W3Schools" /></a>
</td>
<th valign="middle" class="right" align="left">
<iframe id="adframe" style="background-color:#808080" height="90" width="728" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" 
src="../tryitbanner.asp@secid=trydhtml&rnd=0.4091761"></iframe>
</th>
</tr>
</table>

<table width="100%" border="0" cellpadding="5" cellspacing="0">
<form action="tryit_view.asp" method="post" target="view"><tr>
<td colspan="2">
<input name="submit" type="submit" value="Edit the text and click me" onclick="displayad()">
</td>
</tr>
<tr>
<td width="50%">
<textarea width="100%" height="400px" style="width:100%;height:400px" name="code" wrap="logical" rows="21" cols="42">
<html>
<head>
<script type="text/javascript">
function getDigits()
{
num=new Array("0fdr.gif","1fdr.gif","2fdr.gif","3fdr.gif","4fdr.gif","5fdr.gif","6fdr.gif","7fdr.gif","8fdr.gif","9fdr.gif");
time=new Date();
hour=time.getHours()
if (hour<10)
	{
	document.getElementById('hour1').src=num[0];
	h2="'" + hour + "'";
	h2=h2.charAt(1);
	document.getElementById('hour2').src=num[h2];
	}
else
	{
	h1="'" + hour + "'";
	h1=h1.charAt(1);
	document.getElementById('hour1').src=num[h1];
	h2="'" + hour + "'";
	h2=h2.charAt(2);
	document.getElementById('hour2').src=num[h2];
	}
minute=time.getMinutes();
if (minute<10)
	{
	document.getElementById('minute1').src=num[0];
	m2="'" + minute + "'";
	m2=m2.charAt(1);
	document.getElementById('minute2').src=num[m2];
	}
else
	{
	m1="'" + minute + "'";
	m1=m1.charAt(1);
	document.getElementById('minute1').src=num[m1];
	m2="'" + minute + "'";
	m2=m2.charAt(2);
	document.getElementById('minute2').src=num[m2];
	}
second=time.getSeconds();
if (second<10)
	{
	document.getElementById('second1').src=num[0];
	s2="'" + second + "'";
	s2=s2.charAt(1);
	document.getElementById('second2').src=num[s2];
	}
else
	{
	s1="'" + second + "'";
	s1=s1.charAt(1);
	document.getElementById('second1').src=num[s1];
	s2="'" + second + "'";
	s2=s2.charAt(2);
	document.getElementById('second2').src=num[s2];
	}
}
function showTime()
{
timer=setTimeout("getDigits()",10);
interval=setInterval("getDigits()",1000);
}
function stopInterval()
{
clearTimeout(timer);
clearInterval(interval);
}
</script>
</head>

<body onload="showTime()" onunload="stopInterval()" bgcolor="#000000">
<img id="hour1" />
<img id="hour2" />
<img id="minute1" />
<img id="minute2" />
<img id="second1" />
<img id="second2" />
</body>
</html>

</textarea>
</td>
<td>
<iframe width="100%" height="400px" style="width:100%;height:400px;background-color:ffffff" name="view" src="tryit_view.asp@filename=trydhtml_timeimage"></iframe>
</td>
</tr>
<tr>
<th colspan="2" class="right" align="left">
Edit the text above, and click on the button to see the result.
</th>
</tr>
</form></table>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -