1、html左導航菜單拉伸,右邊文章也跟著變怎麼解決
<style>
#D1 {
BACKGROUND-COLOR: lightgreen;
BORDER-BOTTOM: white 2px outset;
BORDER-LEFT: white 2px outset;
BORDER-RIGHT: white 2px outset;
BORDER-TOP: white 2px outset;
LEFT: 0px; POSITION: absolute;
TOP: 0px; VISIBILITY: hidden;
WIDTH: 300px;
layer-background-color: lightgreen
}
a{font-size:9pt}
a:link{text-decoration:none}
a:hover{text-decoration:none;color:#FFFFFF}
a:visited{text-decoration:none}
.40pt{font-size:40pt;color:#3399ff;font-family:文鼎琥珀繁}
</style>
<script language="javascript">
function menuIn() //菜單隱藏
{
if(n4) {
clearTimeout(out_ID)
if( menu.top > menuH*-1+20+10 ) {
menu.top -= 8
in_ID = setTimeout("menuIn()", 1)
}
else if( menu.top > menuH*-1+20 ) {
menu.top--
in_ID = setTimeout("menuIn()", 1)
}
}
else {
clearTimeout(out_ID)
if( menu.pixelTop > menuH*-1+20+10 ) {
menu.pixelTop -= 8
in_ID = setTimeout("menuIn()", 1)
}
else if( menu.pixelTop > menuH*-1+20 ) {
menu.pixelTop--
in_ID = setTimeout("menuIn()", 1)
}
}
}
function menuOut() //菜單顯示
{
if(n4) {
clearTimeout(in_ID)
if( menu.top < -10) {
menu.top += 4
out_ID = setTimeout("menuOut()", 1)
}
else if( menu.top < 0) {
menu.top++
out_ID = setTimeout("menuOut()", 1)
}
}
else {
clearTimeout(in_ID)
if( menu.pixelTop < -10) {
menu.pixelTop += 2
out_ID = setTimeout("menuOut()", 1)
}
else if( menu.pixelTop < 0 ) {
menu.pixelTop++
out_ID = setTimeout("menuOut()", 1)
}
}
}
function fireOver() {
clearTimeout(F_out)
F_over = setTimeout("menuOut()", 10)
}
function fireOut() {
clearTimeout(F_over)
F_out = setTimeout("menuIn()", 10)
}
function init() {
if(n4) {
menu = document.D1
menuH = menu.document.height
menu.top = menu.document.height*-1+20
menu.onmouseover = menuOut
menu.onmouseout = menuIn
menu.visibility = "visible"
}
else if(e4) {
menu = D1.style
menuH = D1.offsetHeight
D1.style.pixelTop = D1.offsetHeight*-1+20
D1.onmouseover = fireOver
D1.onmouseout = fireOut
D1.style.visibility = "visible"
}
}
F_over=F_out=in_ID=out_ID=null
n4 = (document.layers)?1:0
e4 = (document.all)?1:0;
</script>
<div id="D1">
<table border="0" width="294">
<TBODY>
<tr>
<td align="middle" bgColor="#008000" rowSpan="2" width="14"><font color="#FFFFFF">
導
航
菜
單</font></td>
<td width="127"> <ul>
<li><a href="javascript:void(0)">站長特效網</a></li>
<li><a href="javascript:void(0)">網站首頁</a></li>
<li><a href="javascript:void(0)">zzjs</a></li>
<li><a href="javascript:void(0)">網頁特效</a></li>
<li><a href="javascript:void(0)">站長特效</a></li>
</ul>
</td>
<td width="133">
</td>
</tr>
</TBODY>
</table>
</div>
<body onload="init()" >
</body>
2、像163一樣的網站頂部伸縮廣告代碼
呵呵,原來那麼多人喜歡我的網站,把原始代碼送上。 <script language="JavaScript"> //轉載請留此信息, www.zzjs.net 兼容性自己弄了好久,要不您試試看? //頭部伸縮 //function setCookie(www_zzjs_net,sValue,expireHours) { //var cookieString = www_zzjs_net + "=" + escape(sValue); //;判斷是否設置過期時間 這里是關閉窗口清理 //if (expireHours>0) { // var date = new Date(); // date.setTime(date.getTime + expireHours * 3600 * 1000); // cookieString = cookieString + "; expire=" + date.toGMTString(); //} // document.cookie = cookieString; //} function setCookie(www_zzjs_net,value) {//設置為一天時間。 var Days = 1; var exp = new Date(); exp.setTime(exp.getTime() + Days*10*1000); //上面是10秒內不重復顯示,一天內不重復顯示改為Days*24*60*60*1000 document.cookie = www_zzjs_net + "="+ escape (value) + ";expires=" + exp.toGMTString(); } function getCookie(www_zzjs_net) { var aCookie = document.cookie.split("; "); for (var j=0; j < aCookie.length; j++){ var aCrumb = aCookie[j].split("="); if (escape(www_zzjs_net) == aCrumb[0]) return unescape(aCrumb[1]); } return null; }//歡迎來到站長特效網,我們的網址是 www.zzjs.net ,很好記,zz站長,js就是js特效,本站收集大量高質量js代碼,還有許多廣告代碼下載。 //cookies版本 var time = 500; var h = 0; function addCount() { if(time>0) { time--; h = h+15; } else { return; } if(h>150) //高度 { return; } document.getElementById("ads").style.display = ""; document.getElementById("ads").style.height = h+"px"; setTimeout("addCount()",30); } window.onload = function showAds() { if(getCookie('load')) //如果cookie有值則判斷為已經登陸過,廣告隱藏起來 document.getElementById("ads").style.display="none"; else //如果cookie沒有值則判斷為第一次登陸 { setCookie('load',1,24 ); // addCount(); setTimeout("noneAds()",15000); //停留時間自己適當調整 } } var T = 1024; var N = 150; //高度 function noneAds() { if(T>0) { T--; N = N-15; } else { return; } if(N<0) { document.getElementById("ads").style.display = "none"; return; } document.getElementById("ads").style.height = N+"px"; setTimeout("noneAds()",30); }//歡迎來到站長特效網,我們的網址是 www.zzjs.net ,很好記,zz站長,js就是js特效,本站收集大量高質量js代碼,還有許多廣告代碼下載。 document.write('<div id="ads" style="margin:auto;display:none;height:0px;overflow:hidden;text-align:center;position:relative;z-index:100;">'); document.write('<a href=" http://imsky.taobao.com " target="_blank" title="站長sky的淘寶網店,淘寶交易,安全放心!"><img src=" http://www.zzjs.net/ad/taobao.gif" /></a>'); document.write('</div>'); </script>
3、怎麼用FLASH做圖片輪換 圖下面帶數字的,
剛回答了一個 熱氣還沒過 我給你貼過來<TABLE id=idSlider2 border=0 cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD class="td_f"><A href="dongtai_nei.asp?id=143" ><img src=" http://www.nt2jdongchi.cn/admin/adm_news/image/63428102010135919_1.gif" onload="return imgzoom(this,600);" onClick="javascript:window.open(this.src);" style="cursor:pointer;"/></A></TD>
<TD class="td_f"><A href="dongtai_nei.asp?id=141" ><img src=" http://www.nt2jdongchi.cn/admin/adm_news/image/445121020109533_1.gif" onload="return imgzoom(this,600);" onClick="javascript:window.open(this.src);" style="cursor:pointer;"/></A></TD>
<TD class="td_f"><A href="dongtai_nei.asp?id=138" ><img src=" http://www.nt2jdongchi.cn/admin/adm_news/image/5621672010174738_1.gif" onload="return imgzoom(this,600);" onClick="javascript:window.open(this.src);" style="cursor:pointer;"/></A></TD>
<TD class="td_f"><A href="dongtai_nei.asp?id=133" ><img src=" http://www.nt2jdongchi.cn/admin/adm_news/image/4781662010101327_1.gif" onload="return imgzoom(this,600);" onClick="javascript:window.open(this.src);" style="cursor:pointer;"/></A></TD>
<TD class="td_f"><A href="dongtai_nei.asp?id=132" ><img src=" http://www.nt2jdongchi.cn/admin/adm_news/image/5081262010102355_1.gif" onload="return imgzoom(this,600);" onClick="javascript:window.open(this.src);" style="cursor:pointer;"/></A></TD>
</TR>
</TBODY>
</TABLE>
<SCRIPT language=javascript>
if(typeof(pgvMain) == 'function')
pgvMain();
</SCRIPT>
<SCRIPT>
var gtopTab="one";
function $id(id){
return document.getElementById(id);
}
function changesTab(tab_id){
if (tab_id==gtopTab){
return;
}else{
$id(gtopTab).className="unselect";
$id(tab_id).className="select";
$id("tab_"+gtopTab).style.display="none";
$id("tab_"+tab_id).style.display="block";
gtopTab=tab_id;
}
}
</SCRIPT>
<SCRIPT type=text/javascript>
var $ = function (id) {
return "string" == typeof id ? document.getElementById(id) : id;
};
var Extend = function(destination, source) {
for (var property in source) {
destination[property] = source[property];
}
return destination;
}
var CurrentStyle = function(element){
return element.currentStyle || document.defaultView.getComputedStyle(element, null);
}
var Bind = function(object, fun) {
var args = Array.prototype.slice.call(arguments).slice(2);
return function() {
return fun.apply(object, args.concat(Array.prototype.slice.call(arguments)));
}
}
var Tween = {
Quart: {
easeOut: function(t,b,c,d){
return -c * ((t=t/d-1)*t*t*t - 1) + b;
}
},
Back: {
easeOut: function(t,b,c,d,s){
if (s == undefined) s = 1.70158;
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
}
},
Bounce: {
easeOut: function(t,b,c,d){
if ((t/=d) < (1/2.75)) {
return c*(7.5625*t*t) + b;
} else if (t < (2/2.75)) {
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
} else if (t < (2.5/2.75)) {
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
} else {
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
}
}
}
}
//容器對象,滑動對象,切換數量
var SlideTrans = function(container, slider, count, options) {
this._slider = $(slider);
this._container = $(container);//容器對象
this._timer = null;//定時器
this._count = Math.abs(count);//切換數量
this._target = 0;//目標值
this._t = this._b = this._c = 0;//tween參數
this.Index = 0;//當前索引
this.SetOptions(options);
//歡迎來到站長特效網,我們的網址是www.zzjs.net,很好記,zz站長,js就是js特效,本站收集大量高質量js代碼,還有許多廣告代碼下載。
this.Auto = !!this.options.Auto;
this.Duration = Math.abs(this.options.Duration);
this.Time = Math.abs(this.options.Time);
this.Pause = Math.abs(this.options.Pause);
this.Tween = this.options.Tween;
this.onStart = this.options.onStart;
this.onFinish = this.options.onFinish;
var bVertical = !!this.options.Vertical;
this._css = bVertical ? "top" : "left";//方向
//樣式設置
var p = CurrentStyle(this._container).position;
p == "relative" || p == "absolute" || (this._container.style.position = "relative");
this._container.style.overflow = "hidden";
this._slider.style.position = "absolute";
this.Change = this.options.Change ? this.options.Change :
this._slider[bVertical ? "offsetHeight" : "offsetWidth"] / this._count;
};
SlideTrans.prototype = {
//設置默認屬性
SetOptions: function(options) {
this.options = {//默認值
Vertical: true,//是否垂直方向(方向不能改)
Auto: true,//是否自動
Change: 0,//改變數
Duration: 50,//滑動持續時間
Time: 10,//滑動延時
Pause: 4000,//停頓時間(Auto為true時有效)
onStart: function(){},//開始轉換時執行
onFinish: function(){},//完成轉換時執行
Tween: Tween.Quart.easeOut//tween運算元
};//歡迎來到站長特效網,我們的網址是www.zzjs.net,很好記,zz站長,js就是js特效,本站收集大量高質量js代碼,還有許多廣告代碼下載。
Extend(this.options, options || {});
},
//開始切換
Run: function(index) {
//修正index
index == undefined && (index = this.Index);
index < 0 && (index = this._count - 1) || index >= this._count && (index = 0);
//設置參數
this._target = -Math.abs(this.Change) * (this.Index = index);
this._t = 0;
this._b = parseInt(CurrentStyle(this._slider)[this.options.Vertical ? "top" : "left"]);
this._c = this._target - this._b;
this.onStart();
this.Move();
},
//移動
Move: function() {
clearTimeout(this._timer);
//未到達目標繼續移動否則進行下一次滑動
if (this._c && this._t < this.Duration) {
this.MoveTo(Math.round(this.Tween(this._t++, this._b, this._c, this.Duration)));
this._timer = setTimeout(Bind(this, this.Move), this.Time);
}else{
this.MoveTo(this._target);
this.Auto && (this._timer = setTimeout(Bind(this, this.Next), this.Pause));
}//歡迎來到站長特效網,我們的網址是www.zzjs.net,很好記,zz站長,js就是js特效,本站收集大量高質量js代碼,還有許多廣告代碼下載。
},
//移動到
MoveTo: function(i) {
this._slider.style[this._css] = i + "px";
},
//下一個
Next: function() {
this.Run(++this.Index);
},
//上一個
Previous: function() {
this.Run(--this.Index);
},
//停止
Stop: function() {
clearTimeout(this._timer); this.MoveTo(this._target);
}
};
</SCRIPT>
<SCRIPT>
//new SlideTrans("idContainer", "idSlider", 3).Run();
///////////////////////////////////////////////////////////
var forEach = function(array, callback, thisObject){
if(array.forEach){
array.forEach(callback, thisObject);
}else{
for (var i = 0, len = array.length; i < len; i++) { callback.call(thisObject, array[i], i, array); }
}
}//歡迎來到站長特效網,我們的網址是www.zzjs.net,很好記,zz站長,js就是js特效,本站收集大量高質量js代碼,還有許多廣告代碼下載。
var st = new SlideTrans("idContainer2", "idSlider2", 5, { Vertical: false });
var nums = [];
//插入數字
for(var i = 0, n = st._count - 1; i <= n;){
(nums[i] = $("idNum").appendChild(document.createElement("li"))).innerHTML = ++i;
}
forEach(nums, function(o, i){
o.onmouseover = function(){ o.className = "on"; st.Auto = false; st.Run(i); }
o.onmouseout = function(){ o.className = ""; st.Auto = true; st.Run(); }
})
//設置按鈕樣式
st.onStart = function(){
forEach(nums, function(o, i){ o.className = st.Index == i ? "on" : ""; })
}
//$("idAuto").onclick = function(){
//if(st.Auto){
//st.Auto = false; st.Stop(); this.value = "自動";
//}else{
//st.Auto = true; st.Run(); this.value = "停止";
//}
//}
//$("idNext").onclick = function(){ st.Next(); }
//$("idPre").onclick = function(){ st.Previous(); }
//$("idTween").onchange = function(){
//switch (parseInt(this.value)){
//case 2 :
//st.Tween = Tween.Bounce.easeOut; break;
//case 1 :
//st.Tween = Tween.Back.easeOut; break;
//default :
//st.Tween = Tween.Quart.easeOut;
//}
//}
st.Run();
</SCRIPT>
4、如何在注冊頁面實現添加省市二級聯動菜單
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="站長,網頁特效,js特效,廣告代碼,zzjs,zzjs.net,sky,www.zzjs.net,站長特效 網" />
<meta name="description" content="站長必備js特效及廣告代碼。大量高質量js特效,提供高質量廣告代碼下載,盡在站長特效網" />
<title>JS省市二級聯動菜單,sky整理收集。</title>
<style>
<!--
body { font-size: 14px }
-->
</style>
</head>
<body bgcolor=#FFFFFF alink=#333333 vlink=#333333 link=#333333 topmargin=0 leftmargin=0 onload="init()">
<a href="<#ZC_BLOG_HOST#>">站長特效網</a>,站長必備的高質量網頁特效和廣告代碼。zzjs.net,站長js特效。<hr>
<!--歡迎來到站長特效網,我們網站收集大量高質量js特效,提供許多廣告代碼下載,網址:www.zzjs.net,[email protected],用.net打造靚站-->
<form action="<#ZC_BLOG_HOST#>" method="post" name="creator" enctype="multipart/form-data">
<script language="javascript">
<!--
var where = new Array(35);
function comefrom(loca,locacity) { this.loca = loca; this.locacity = locacity; }
where[0]= new comefrom("請選擇省份名","請選擇城市名");
where[1] = new comefrom("北京","|東城|西城|崇文|宣武|朝陽|豐台|石景山|海淀|門頭溝|房山|通州|順義|昌平|大興|平谷|懷柔|密雲|延慶"); //歡迎來到站長特效網,我們的網址是www.zzjs.net,很好記,zz站長,js就是js特效,本站收集大量高質量js代碼,還有許多廣告代碼下載。
where[2] = new comefrom("上海","|黃浦|盧灣|徐匯|長寧|靜安|普陀|閘北|虹口|楊浦|閔行|寶山|嘉定|浦東|金山|松江|青浦|南匯|奉賢|崇明");//歡迎來到站長特效網,我們的網址是www.zzjs.net,很好記,zz站長,js就是js特效,本站收集大量高質量js代碼,還有許多廣告代碼下載。
where[3] = new comefrom("天津","|和平|東麗|河東|西青|河西|津南|南開|北辰|河北|武清|紅撟|塘沽|漢沽|大港|寧河|靜海|寶坻|薊縣");
where[4] = new comefrom("重慶","|萬州|涪陵|渝中|大渡口|江北|沙坪壩|九龍坡|南岸|北碚|萬盛|雙撟|渝北|巴南|黔江|長壽|綦江|潼南|銅梁|大足|榮昌|壁山|梁平|城口|豐都|墊江|武隆|忠縣|開縣|雲陽|奉節|巫山|巫溪|石柱|秀山|酉陽|彭水|江津|合川|永川|南川");
where[5] = new comefrom("河北","|石家莊|邯鄲|邢台|保定|張家口|承德|廊坊|唐山|秦皇島|滄州|衡水");
where[6] = new comefrom("山西","|太原|大同|陽泉|長治|晉城|朔州|呂梁|忻州|晉中|臨汾|運城");
where[7] = new comefrom("內蒙古","|呼和浩特|包頭|烏海|赤峰|呼倫貝爾盟|阿拉善盟|哲里木盟|興安盟|烏蘭察布盟|錫林郭勒盟|巴彥淖爾盟|伊克昭盟");
where[8] = new comefrom("遼寧","|沈陽|大連|鞍山|撫順|本溪|丹東|錦州|營口|阜新|遼陽|盤錦|鐵嶺|朝陽|葫蘆島");
where[9] = new comefrom("吉林","|長春|吉林|四平|遼源|通化|白山|松原|白城|延邊");
where[10] = new comefrom("黑龍江","|哈爾濱|齊齊哈爾|牡丹江|佳木斯|大慶|綏化|鶴崗|雞西|黑河|雙鴨山|伊春|七台河|大興安嶺");
where[11] = new comefrom("江蘇","|南京|鎮江|蘇州|南通|揚州|鹽城|徐州|連雲港|常州|無錫|宿遷|泰州|淮安");
where[12] = new comefrom("浙江","|杭州|寧波|溫州|嘉興|湖州|紹興|金華|衢州|舟山|台州|麗水");
where[13] = new comefrom("安徽","|合肥|蕪湖|蚌埠|馬鞍山|淮北|銅陵|安慶|黃山|滁州|宿州|池州|淮南|巢湖|阜陽|六安|宣城|亳州");
where[14] = new comefrom("福建","|福州|廈門|莆田|三明|泉州|漳州|南平|龍岩|寧德");
where[15] = new comefrom("江西","|南昌市|景德鎮|九江|鷹潭|萍鄉|新餘|贛州|吉安|宜春|撫州|上饒");
where[16] = new comefrom("山東","|濟南|青島|淄博|棗庄|東營|煙台|濰坊|濟寧|泰安|威海|日照|萊蕪|臨沂|德州|聊城|濱州|菏澤");
where[17] = new comefrom("河南","|鄭州|開封|洛陽|平頂山|安陽|鶴壁|新鄉|焦作|濮陽|許昌|漯河|三門峽|南陽|商丘|信陽|周口|駐馬店|濟源");
where[18] = new comefrom("湖北","|武漢|宜昌|荊州|襄樊|黃石|荊門|黃岡|十堰|恩施|潛江|天門|仙桃|隨州|咸寧|孝感|鄂州");
where[19] = new comefrom("湖南","|長沙|常德|株洲|湘潭|衡陽|岳陽|邵陽|益陽|婁底|懷化|郴州|永州|湘西|張家界");
where[20] = new comefrom("廣東","|廣州|深圳|珠海|汕頭|東莞|中山|佛山|韶關|江門|湛江|茂名|肇慶|惠州|梅州|汕尾|河源|陽江|清遠|潮州|揭陽|雲浮");
where[21] = new comefrom("廣西","|南寧|柳州|桂林|梧州|北海|防城港|欽州|貴港|玉林|南寧地區|柳州地區|賀州|百色|河池");
where[22] = new comefrom("海南","|海口|三亞");
where[23] = new comefrom("四川","|成都|綿陽|德陽|自貢|攀枝花|廣元|內江|樂山|南充|宜賓|廣安|達川|雅安|眉山|甘孜|涼山|瀘州");
where[24] = new comefrom("貴州","|貴陽|六盤水|遵義|安順|銅仁|黔西南|畢節|黔東南|黔南");
where[25] = new comefrom("雲南","|昆明|大理|曲靖|玉溪|昭通|楚雄|紅河|文山|思茅|西雙版納|保山|德宏|麗江|怒江|迪慶|臨滄");
where[26] = new comefrom("西藏","|拉薩|日喀則|山南|林芝|昌都|阿里|那曲");
where[27] = new comefrom("陝西","|西安|寶雞|咸陽|銅川|渭南|延安|榆林|漢中|安康|商洛");
where[28] = new comefrom("甘肅","|蘭州|嘉峪關|金昌|白銀|天水|酒泉|張掖|武威|定西|隴南|平涼|慶陽|臨夏|甘南");
where[29] = new comefrom("寧夏","|銀川|石嘴山|吳忠|固原");
where[30] = new comefrom("青海","|西寧|海東|海南|海北|黃南|玉樹|果洛|海西");
where[31] = new comefrom("新疆","|烏魯木齊|石河子|克拉瑪依|伊犁|巴音郭勒|昌吉|克孜勒蘇柯爾克孜|博爾塔拉|吐魯番|哈密|喀什|和田|阿克蘇");
where[32] = new comefrom("香港","");
where[33] = new comefrom("澳門","");
where[34] = new comefrom("台灣","|台北|高雄|台中|台南|屏東|南投|雲林|新竹|彰化|苗栗|嘉義|花蓮|桃園|宜蘭|基隆|台東|金門|馬祖|澎湖");
where[35] = new comefrom("其它","|北美洲|南美洲|亞洲|非洲|歐洲|大洋洲");
function select() {
with(document.creator.province) { var loca2 = options[selectedIndex].value; }
for(i = 0;i < where.length;i ++) {
if (where[i].loca == loca2) {
loca3 = (where[i].locacity).split("|");
for(j = 0;j < loca3.length;j++) { with(document.creator.city) { length = loca3.length; options[j].text = loca3[j]; options[j].value = loca3[j]; var loca4=options[selectedIndex].value;}}
break;
}}
document.creator.newlocation.value=loca2+loca4;
} //歡迎來到站長特效網,我們的網址是www.zzjs.net,很好記,zz站長,js就是js特效,本站收集大量高質量js代碼,還有許多廣告代碼下載。
function init() {
with(document.creator.province) {
length = where.length;
for(k=0;k<where.length;k++) { options[k].text = where[k].loca; options[k].value = where[k].loca; }
options[selectedIndex].text = where[0].loca; options[selectedIndex].value = where[0].loca;
}
with(document.creator.city) {
loca3 = (where[0].locacity).split("|");
length = loca3.length;
for(l=0;l<length;l++) { options[l].text = loca3[l]; options[l].value = loca3[l]; }
options[selectedIndex].text = loca3[0]; options[selectedIndex].value = loca3[0];
}} //歡迎來到站長特效網js就是js特效,本站收集大量高質量js代碼,還有許多廣告代碼下載。
-->
5、B/S程序,如何禁用IE右鍵功能。
||<script language="javascript">
function disableRightClick(e)
{
var message = "右鍵禁用,有什麼問題請到站長特效網提問。";
if(!document.rightClickDisabled) // initialize
{
if(document.layers)
{
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown = disableRightClick;
}
else document.oncontextmenu = disableRightClick;
return document.rightClickDisabled = true;
}
if(document.layers || (document.getElementById && !document.all))
{
if (e.which==2||e.which==3)
{
alert(message);
return false;
}
}
else
{
alert(message);
return false;
}
}
disableRightClick();
</script>
<a href="
http://www.zzjs.net/
">站長特效</a>,站長必備的高質量網頁特效和廣告代碼。zzjs.net,站長js特效。<hr>
<!--歡迎來到站長特效網,我們網站收集大量高質量js特效,提供許多廣告代碼下載,網址:
www.zzjs.net
,
[email protected]
,用.net打造靚站-->
6、需求個js 實現點擊文字選中復選框特效
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="站長,網頁特效,js特效,廣告代碼,zzjs,zzjs.net,sky,www.zzjs.net,站長特效 網" />
<meta name="description" content="www.zzjs.net,站長特效網,站長必備js特效及廣告代碼。大量高質量js特效,提供高質量廣告代碼下載,盡在站長特效網" />
<title>點擊文字選中單選框,sky整理收集,站長特效歡迎您。</title>
<style type="text/css">
<!--
body { font-family: "宋體"; font-size: 9pt; margin-top: 0px; margin-left: 4px; margin-right: 0px}
A { COLOR: black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none }
A:hover { COLOR: red; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: underline }
a:active { font: 9pt "宋體"; cursor: hand; color: #FF0033 }
-->
</style>
</head>
<body>
<a href="http://www.zzjs.net/">站長特效網</a>,站長必備的高質量網頁特效和廣告代碼。zzjs.net,站長js特效。<hr>
<!--歡迎來到站長特效網,我們網站收集大量高質量js特效,提供許多廣告代碼下載,網址:www.zzjs.net,[email protected],用.net打造靚站-->
<script type="text/javascript" src="http://www.zzjs.net/ad/tc.js"></script>
<center>
<table border=0 bordercolor=#111111 borderlight=green style="border-collapse: collapse" cellpadding="0" cellspacing="0">
<tr><td align=center>
<font size=3 color=#FF0033 face="Arial, Helvetica, sans-serif">
<strong style="font-weight: 400">下面為腳本顯示區<br>
</strong></font></td></tr><tr><td align=center width=300> <p>
<span style="font-size: 9pt">看看下面的選擇框,似乎沒有什麼不同的。微妙之處在於,選擇項目時不必非得在框內點擊滑鼠了,在文本上選擇即可。不信試一試吧。</span></p>
<form>
<label for="check1"><span style="font-size: 9pt">經常來這里</span></label><span style="font-size: 9pt">
<input type="CHECKBOX" id="check1" value="often" name="checkoften">
<label for="check2">偶爾來看看</label>
<input type="CHECKBOX" id="check2" value="seldom" name="checkseldom">
</span>
</form>
</td></tr></table></center>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>
7、如何做出百度登入的彈出頁面的網頁效果??????
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>頁面中彈出小窗口,頁面背景直接變半透明-syku.net</title>
<style>
html,body{font-size:12px;margin:0px;height:100%;}
.mesWindow{border:#666 1px solid;background:#fff;}
.mesWindowTop{border-bottom:#eee 1px solid;margin-left:4px;padding:3px;font-weight:bold;text-align:left;font-size:12px;}
.mesWindowContent{margin:4px;font-size:12px;}
.mesWindow .close{height:15px;width:28px;border:none;cursor:pointer;text-decoration:underline;background:#fff}
</style>
<script>
var isIe=(document.all)?true:false;
//設置select的可見狀態
function setSelectState(state)
{
var objl=document.getElementsByTagName('select');
for(var i=0;i<objl.length;i++)
{
objl[i].style.visibility=state;
}
}
function mousePosition(ev)
{
if(ev.pageX || ev.pageY)
{
return {x:ev.pageX, y:ev.pageY};
}
return {
x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,y:ev.clientY + document.body.scrollTop - document.body.clientTop
};
}
//彈出方法
function showMessageBox(wTitle,content,pos,wWidth)
{
closeWindow();
var bWidth=parseInt(document.documentElement.scrollWidth);
var bHeight=parseInt(document.documentElement.scrollHeight);
if(isIe){
setSelectState('hidden');}
var back=document.createElement("div");
back.id="back";
var styleStr="top:0px;left:0px;position:absolute;background:#666;width:"+bWidth+"px;height:"+bHeight+"px;";
styleStr+=(isIe)?"filter:alpha(opacity=40);":"opacity:0.40;";
back.style.cssText=styleStr;
document.body.appendChild(back);
var mesW=document.createElement("div");
mesW.id="mesWindow";
mesW.className="mesWindow";
mesW.innerHTML="<div class='mesWindowTop'><table width='100%' height='100%'><tr><td>"+wTitle+"</td><td style='width:1px;'><input type='button' onclick='closeWindow();' title='關閉窗口' class='close' value='關閉' /></td></tr></table></div><div class='mesWindowContent' id='mesWindowContent'>"+content+"</div><div class='mesWindowBottom'></div>";
styleStr="left:"+(((pos.x-wWidth)>0)?(pos.x-wWidth):pos.x)+"px;top:"+(pos.y)+"px;position:absolute;width:"+wWidth+"px;";
mesW.style.cssText=styleStr;
document.body.appendChild(mesW);
}
function showBackground(obj,endInt)
{
obj.filters.alpha.opacity+=1;
if(obj.filters.alpha.opacity<endInt)
{
setTimeout(function(){showBackground(obj,endInt)},8);
}
}
//關閉窗口
function closeWindow()
{
if(document.getElementById('back')!=null)
{
document.getElementById('back').parentNode.removeChild(document.getElementById('back'));
}
if(document.getElementById('mesWindow')!=null)
{
document.getElementById('mesWindow').parentNode.removeChild(document.getElementById('mesWindow'));
}
if(isIe){
setSelectState('');}
}
//測試彈出
function testMessageBox(ev)
{
var objPos = mousePosition(ev);
messContent="<div style='padding:20px 0 20px 0;text-align:center'>消息正文</div>";
showMessageBox('窗口標題',messContent,objPos,350);
}
</script>
</head>
<body>
<div style="padding:20px">
<div style="text-align:left";><a href="#none" onclick="testMessageBox(event);">彈出窗口</a></div>
<div style="text-align:left;padding-left:20px;padding-top:10px";><select><option>下拉</option></select>彈出窗口時會將其隱藏,關閉時會讓其顯示,目的是在IE中防止彈出的DIV擋不住下拉框</div>
<div style="text-align:center";><a href="#none" onclick="testMessageBox(event);">彈出窗口</a></div>
<div style="text-align:right";><a href="#none" onclick="testMessageBox(event);">彈出窗口</a></div>
</div>
</body>
</html>
本文來自:一網情深(www.1573net.com) 原文鏈接:http://www.1573net.com/daima/ihuakuang-texiao/790.htm
8、網頁關閉時提示加入收藏的代碼是什麼,怎麼用啊?
直接將此代碼寫入頁面的總代嗎即可,代碼如下:
記錄cookies實現退出網頁時彈出「加入收藏」的代碼:
<script language="java script" type="text/java script">
function bookmark()
{
if(readCookie("bookmark")!="yes")
{
saveCookie("bookmark","yes",1);
window.external.AddFavorite('這里輸入需要收藏的網站網址, '關鍵詞);
}
}
function saveCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000))
var expires = "; expires="+date.toGMTString()
}
else expires = ""
document.cookie = name+"="+value+expires+"; path=/"
}
function readCookie(name) {
var nameEQ = name + "="
var ca = document.cookie.split(';')
for(var i=0;i<ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length)
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length)
}
return null
}
</script>
<body onUnload="bookmark()">
</body>
9、能不能推薦幾個像開創者素材這一類的前端特效網站,我想仿站(關於jquery特效類的網站)?
開創者素材好像16年才上線的吧,不過在這行業排版已經是很好的了。我也是剛開版始用開創者權素材下載前端特效,注冊還送一百積分,挺好用的。像其他的站長素材、17素材什麼的排版也不怎麼樣。我在百度知道還是個小菜鳥,希望回答的問題能得到您的採納,謝謝。
10、html可以無限彈窗嗎?如果可以請幫我寫一個簡單的無限彈窗?小弟拜謝
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="keywords" content="站長,網頁特效,js特效,廣告代碼,zzjs,zzjs.net,sky,www.zzjs.net,站長特效 網" />
<meta name="description" content="www.zzjs.net,站長特效網,站長必備js特效及廣告代碼。大量高質量js特效,提供高質量廣告代碼下載,盡在站長特效網" />
<title>很有意思的跳出窗口,sky整理收集,站長特效歡迎您。</title>
<style type="text/css">
<!--
body { font-family: "宋體"; font-size: 9pt; margin-top: 0px; margin-left: 0px; margin-right: 0px}
A { COLOR: black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none }
A:hover { COLOR: red; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: underline }
a:active { font: 9pt "宋體"; cursor: hand; color: #FF0033 }
-->
</style>
</head>
<body bgcolor="#fef4d9">
<a href="<#ZC_BLOG_HOST#>">站長特效網</a>,站長必備的高質量網頁特效和廣告代碼。zzjs.net,站長js特效。<hr>
<!--歡迎來到站長特效網,我們網站收集大量高質量js特效,提供許多廣告代碼下載,網址:www.zzjs.net,[email protected],用.net打造靚站-->
<center> </center>
<center>
<table border=0 bordercolor="#111111" borderlight=green style="border-collapse: collapse" cellpadding="0" cellspacing="0">
<tr><td align=center> </td></tr><tr><td align=center><a href="" onMouseover="alert('為什麼把滑鼠放到這里?');
alert('我不是說過不允許的嗎?');
alert('你還碰');
alert('都說不準碰我了!');
alert('不準動手動腳了!');
alert('我');
alert('再');
alert('說');
alert('最');
alert('後');
alert('一');
alert('遍');
alert('真拿你沒辦法');
alert('還點?');
alert('I 服了 YOU');
alert('進來吧!');
alert('站長特效網,歡迎你下次再來!');
window.location='http://www.zzjs.net';
document.bgColor='black';
document.fgColor='White';
window.href='http://www.zzjs.net';">喂,我可說好了,不準碰我</a>
</td></tr>
</table></center>
</body>
</html>