回上一頁 JavaScript
簡易回上一頁 JavaScript
<html>
<head>
<script>
function goBack()
{
window.history.back()
}
</script>
</head>
<body>
<a onclick="goBack()">Go Back</a>
</body>
</html>
參考資料:
jon6773 發表在 痞客邦 留言(0) 人氣(27)
jQuery scroll top
jQuery scroll top
<html>
<head>
<script type="text/javascript" src="js/jquery.js"></script>
<!--scroll-->
<script type="text/javascript">
$(function(){
$('#a1').click(function(){
$('html,body').stop().animate({scrollTop:$('#a1').offset().top},800);
return false;
});
});
</script>
<!--scroll end-->
</head>
<body>
<a id="a1"></a>
</body>
</html>
jon6773 發表在 痞客邦 留言(0) 人氣(43)
jQuery go to top slide show hide
jQuery go to top slide show hide
<head>
<style type="text/css">
#gotop {position:fixed; right: 20px; bottom:50px; z-index:100; cursor: pointer; text-align:right; background-color:#f4f4f4; text-align:center; padding:10px; color:#666;-webkit-border-radius:10px; -moz-border-radius:10px; border-radius:10px; " onmouseover="this.style.background='#ebebeb';" onmouseout="this.style.background='#f4f4f4';"}
</style>
<script type="text/javascript" src="js/jquery.js"></script>
<!--gotop-->
<script type="text/javascript">
$(document).ready(function(){
$("#gotop").hide()
$(function(){
$(window).scroll(function(){
if($(this).scrollTop()>1){
$("#gotop").fadeIn();
} else {
$("#gotop").fadeOut();
}
});
});
$("#gotop a").click(function(){
$("html,body").animate({scrollTop:0},800);
return false;
});
});
</script>
<!--gotop end-->
</head>
<body>
<div id="gotop"><a href="#">Top</a></div>
</body>
jon6773 發表在 痞客邦 留言(0) 人氣(41)

jQuery id Tab
1. 先下載jquery.idTabs.min.js
http://www.sunsean.com/idTabs/jquery.idTabs.min.js
jon6773 發表在 痞客邦 留言(0) 人氣(81)
Youtube 設定播放時間
相信大家都分享過Youtube影片,但每次卻都需要重頭看起,其實只要在分享網址後面加一段設定,即可指定從幾分幾秒開始播放。
Youtube網址:
jon6773 發表在 痞客邦 留言(0) 人氣(9,313)

HTML 5 Canvas 畫笑臉
利用html 5 cancas語法,繪製笑臉圖案,除IE6, IE7, IE8不支援外,Chrome 5, Firefox 3.6, Opera 10.6, Safari 5, IE9都支援HTML 5 Canvas。
實際顯示:
jon6773 發表在 痞客邦 留言(0) 人氣(849)

HTML 5 Canvas 繪製星星
利用html 5 cancas語法,繪製星星圖案,並加上外框、漸層與陰影,除IE6, IE7, IE8不支援外,Chrome 5, Firefox 3.6, Opera 10.6, Safari 5, IE9都支援HTML 5 Canvas。
實際顯示:
jon6773 發表在 痞客邦 留言(0) 人氣(849)