function aa(){ document.getElementById("ff12").innerHTML = document.getElementById("aa1").value; document.getElementById("ff9").innerHTML = document.getElementById("aa4").value; document.getElementById("ff4").innerHTML = document.getElementById("aa9").value; document.getElementById("ff1").innerHTML = document.getElementById("aa12").value; document.getElementById("ff11").innerHTML = document.getElementById("aa2").value; document.getElementById("ff10").innerHTML = document.getElementById("aa3").value; document.getElementById("ff2").innerHTML = document.getElementById("aa11").value; document.getElementById("ff3").innerHTML = document.getElementById("aa10").value; document.getElementById("ff5").innerHTML = document.getElementById("aa8").value; document.getElementById("ff6").innerHTML = document.getElementById("aa7").value; document.getElementById("ff7").innerHTML = document.getElementById("aa6").value; document.getElementById("ff8").innerHTML = document.getElementById("aa5").value; }
3月 19, 2014
純javascript
標籤:
JavaScript
6月 18, 2011
3種轉址
1. HTML 的轉址方法:
在 HTML 網頁的 </head> 前加入以下 HMTL 碼,網頁就會自動轉址。
<meta http-equiv="refresh" content="0;url=http://mepopeidia.com" />
其中 content=... 中的 0 是指 0 秒後自動重新整理,並轉址到 "http://mepopeidia.com" 這個 URL。
2. Javascript 的轉址方法:
在 HTML 網頁中原則上是任一地方加入以下 JavaScript 網頁就會轉址。但放在網頁 HTML 碼的開始較有效率(也較有意義)。
<script>document.location.href="http://mepopedia.com";</script>
3. PHP 的轉址方法:
<?php
header('Location: http://mepopedia.com');
exit;
?>
標籤:
HTML,
JavaScript,
php
6月 16, 2011
動態時間 time
var timerID = null;
var timerRunning = false;
function stopclock() {
if (timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function startclock() {
stopclock();
showtime();
}
function showtime() {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
var dateValue = now.getYear() + 1900 + "年" + (now.getMonth() + 1) + "月" + now.getDate() + "日";
var timeValue = ((hours >= 12) ? " 下午 " : " 上午 ");
timeValue += ((hours > 12) ? hours - 12 : hours);
timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
$('#time').html(timeValue);
timerID = setTimeout("showtime()", 1000);
timerRunning = true;
}
$().ready(function () {
startclock();
});
標籤:
JavaScript,
jquery
4月 23, 2009
刪除確認??
if(!confirm('是否確定要刪除?')){return false;}"
在OnClientClick中加入
or
return confirm('確認要刪除嗎?');
or
<script language="javascript" type="text/javascript">
function ConfirmDeletion() {
if (event.srcElement.value == "刪除" )
event.returnValue = confirm("確定要刪除嗎?");
} document.onclick = ConfirmDeletion;
</script>
標籤:
JavaScript
2月 11, 2009
禁回此頁
<script language=javascript>
//---禁回此頁Begin---
function forward() {
setTimeout("forward()",100);
history.forward();
}
if (document.all)
history.forward(); //for ie
else
setTimeout("forward()",100); //for firefox
//---禁回此頁End---
<script>
標籤:
JavaScript
訂閱:
文章 (Atom)