把一張圖片變形扭曲成各種不同的長寬
更新時間:2006年10月13日 00:00:00 作者:
第一步:把如下代碼加入<body>區(qū)域中
<img src="http://my.6to23.com/redriver/helpor/helpor.gif" name="u" border="0" alt="很好玩的">
<script language="JavaScript">
var b = 1;
var c = true;
function fade(){
if(document.all);
if(c == true) {
b++;
}
if(b==100) {
b--;
c = false
}
if(b==10) {
b++;
c = true;
}
if(c == false) {
b--;
}
u.width=150 + b;
u.height=125 - b;
setTimeout("fade()",50);
}
</script>
第二步:把<body>區(qū)域中改為
<body bgcolor="#fef4d9" onLoad="fade()">
<img src="http://my.6to23.com/redriver/helpor/helpor.gif" name="u" border="0" alt="很好玩的">
<script language="JavaScript">
var b = 1;
var c = true;
function fade(){
if(document.all);
if(c == true) {
b++;
}
if(b==100) {
b--;
c = false
}
if(b==10) {
b++;
c = true;
}
if(c == false) {
b--;
}
u.width=150 + b;
u.height=125 - b;
setTimeout("fade()",50);
}
</script>
第二步:把<body>區(qū)域中改為
<body bgcolor="#fef4d9" onLoad="fade()">
相關文章
基于javaweb+jsp實現(xiàn)學生宿舍管理系統(tǒng)
這篇文章主要介紹了基于javaweb+jsp實現(xiàn)的學生宿舍管理系統(tǒng)的示例代碼,文中的代碼介紹詳細,對我們學習JSP有一定的幫助,需要的朋友可以參考一下2021-12-12