日韩天天综合网_野战两个奶头被亲到高潮_亚洲日韩欧美精品综合_av女人天堂污污污_视频一区**字幕无弹窗_国产亚洲欧美小视频_国内性爱精品在线免费视频_国产一级电影在线播放_日韩欧美内地福利_亚洲一二三不卡片区

浮動菜單是如何作出來的mouse事件_JSP教程

編輯Tag賺U幣
教程Tag:暫無Tag,歡迎添加,賺取U幣!

推薦:JSP新手入門初級教程之JSP概述
JSP(IAVA SERVER PAGES)是由Sun 公司在java語言上開發(fā)出來的一種動態(tài)網(wǎng)頁制作技術(shù),其可使您可以將網(wǎng)頁中的動態(tài)部分和靜態(tài)的HTML相分離。您可以使用平常得心應(yīng)手的工具并按照平常的方式來

這個問題由我來做一個最終解答吧。我以前也同樣驚異于閃光地帶的這個特效,苦惱于不知如何實現(xiàn)。我在經(jīng)典提問,有一位網(wǎng)友熱心解答了我的問題,但只是局限于如何加入和“閃光地帶”同樣的效果,而且并不完美,實際上這個腳本還可以實現(xiàn)許多效果,不知是zippy不知道還是沒有用?可是當(dāng)時看代碼看的頭暈眼花的我還是不知如何實現(xiàn),幸運的是隨著時間的推移,我終于找到了這個問題非常圓滿的答案。請看:

這個效果是一個js特效,js文件名為coollayer.js也有叫overlib.js的,它可實現(xiàn)一種非�?岬母硬藛涡Ч�,有5種風(fēng)格:

風(fēng)格1:沒有標(biāo)題欄

風(fēng)格2:顯示標(biāo)題欄

風(fēng)格3:點擊顯示標(biāo)題欄

風(fēng)格4:點擊左側(cè)顯示標(biāo)題欄

風(fēng)格5:居中顯示浮動窗口

在js文件中,絕大部分不必修改,你只要改一下顯示的字體的大小即可。主要修改html文檔頁面,因為彈出的浮動窗口的顯示內(nèi)容全部由它控制�?纯丛创a,非常容易看得懂。比如我新建的網(wǎng)頁:http://q3a.go.163.com

參數(shù)含義:(caption--標(biāo)題)

onMouseOver 用以下函數(shù)控制:

Center(居中)

dcs(text)

dcc(text, caption)

Right

drs(text)

drc(text, caption)

Left

dls(text)

dlc(text, caption)

onMouseOut 用以下函數(shù)控制:

nd()

onClick 用以下函數(shù)控制:

scc(text, caption)

src(text, caption)

slc(text, caption)

其余注意的要點:

在標(biāo)簽內(nèi)必須有下面的2行:

CSS用下面的一行控制,放在之間。

這些內(nèi)容是摘自java2000站點的關(guān)于這個特效的說明文件,我已經(jīng)做成了壓縮包供大家下載。

地址是http://go.163.com/~dreamwar/resource/downloads/classical/coollink.zip同時歡迎大家來我的新網(wǎng)站:“雷神戰(zhàn)夢”(http://q3a.go.163.com)做客,比閃光地帶的那個特效還酷哦��!

附j(luò)ava2000的網(wǎng)址:http://java2000.126.com

附coollayer.js(overlib.js)源文件:

////////////////////////////////////////////////////////////////////////////////////

// overLIB 2.22 -- Please leave this notice.

//

// By Erik Bosrup ([email protected]) Last modified 1999-03-31

// Portions by Dan Steinman, Landon Bradshaw and Gnowknayme.

////////////////////////////////////////////////////////////////////////////////////

//請不要隨便修改

////////////////////////////////////////////////////////////////////////////////////

// CONFIGURATION

////////////////////////////////////////////////////////////////////////////////////

// 主背景色(大區(qū)域)

// 通常使用明快的顏色(淺黃色等...)

if (typeof fcolor == 'undefined') { var fcolor = "#CCCCFF";}

// Border的顏色和標(biāo)題欄的顏色;

// 通常的顏色深(褐色,黑色等。)

if (typeof backcolor == 'undefined') { var backcolor = "#333399";}

// 文字的顏色

// 通常是比較深的顏色;

if (typeof textcolor == 'undefined') { var textcolor = "#000000";}

// 標(biāo)題的顏色

// 通常是明快的顏色;

if (typeof capcolor == 'undefined') { var capcolor = "#FFFFFF";}

// "Close"的顏色

// 通常是明快的顏色;

if (typeof closecolor == 'undefined') { var closecolor = "#9999FF";}

// 彈出的窗口的寬度;

// 100-300 pixels 合適

if (typeof width == 'undefined') { var width = "200";}

// 邊緣的寬度,象素。

// 1-3 pixels 合適

if (typeof border == 'undefined') { var border = "1";}

// 彈出窗口位于鼠標(biāo)左側(cè)或者右側(cè)的距離,象素。

// 3-12合適

if (typeof offsetx == 'undefined') { var offsetx = 10;}

// 彈出窗口位于鼠標(biāo)下方的距離;

// 3-12 合適

if (typeof offsety == 'undefined') { var offsety = 10;}

////////////////////////////////////////////////////////////////////////////////////

// 設(shè)置結(jié)束

////////////////////////////////////////////////////////////////////////////////////

ns4 = (document.layers)? true:false

ie4 = (document.all)? true:false

// Microsoft Stupidity Check.

if (ie4) {

if (navigator.userAgent.indexOf('MSIE 5')>0) {

ie5 = true;

} else {

ie5 = false; }

} else {

ie5 = false;

}

var x = 0;

var y = 0;

var snow = 0;

var sw = 0;

var cnt = 0;

var dir = 1;

var tr = 1;

if ( (ns4) || (ie4) ) {

if (ns4) over = document.overDiv

if (ie4) over = overDiv.style

document.onmousemove = mouseMove

if (ns4) document.captureEvents(Event.MOUSEMOVE)

}

// 以下是頁面中使用的公共函數(shù);

// Simple popup right

function drs(text) {

dts(1,text);

}

// Caption popup right

function drc(text, title) {

dtc(1,text,title);

}

// Sticky caption right

function src(text,title) {

stc(1,text,title);

}

// Simple popup left

function dls(text) {

dts(0,text);

}

// Caption popup left

function dlc(text, title) {

dtc(0,text,title);

}

// Sticky caption left

function slc(text,title) {

stc(0,text,title);

}

// Simple popup center

function dcs(text) {

dts(2,text);

}

// Caption popup center

function dcc(text, title) {

dtc(2,text,title);

}

// Sticky caption center

function scc(text,title) {

stc(2,text,title);

}

// Clears popups if appropriate

function nd() {

if ( cnt >= 1 ) { sw = 0 };

if ( (ns4) || (ie4) ) {

if ( sw == 0 ) {

snow = 0;

hideObject(over);

} else {

cnt ;

}

}

}

// 非公共函數(shù),被其它的函數(shù)調(diào)用;

// Simple popup

function dts(d,text) {

txt = "

" text "
"

layerWrite(txt);

dir = d;

disp();

}

// Caption popup

function dtc(d,text, title) {

txt = "

" title "
" text "
"

layerWrite(txt);

dir = d;

disp();

}

// Sticky

function stc(d,text, title) {

sw = 1;

cnt = 0;

txt = "

" title "Close
" text "
"

layerWrite(txt);

dir = d;

disp();

snow = 0;

}

// Common calls

function disp() {

if ( (ns4) || (ie4) ) {

if (snow == 0) {

if (dir == 2) { // Center

moveTo(over,x offsetx-(width/2),y offsety);

}

if (dir == 1) { // Right

moveTo(over,x offsetx,y offsety);

}

if (dir == 0) { // Left

moveTo(over,x-offsetx-width,y offsety);

}

showObject(over);

snow = 1;

}

}

// Here you can make the text goto the statusbar.

}

// Moves the layer

function mouseMove(e) {

if (ns4) {x=e.pageX; y=e.pageY;}

if (ie4) {x=event.x; y=event.y;}

if (ie5) {x=event.x document.body.scrollLeft; y=event.y document.body.scrollTop;}

if (snow) {

if (dir == 2) { // Center

moveTo(over,x offsetx-(width/2),y offsety);

}

if (dir == 1) { // Right

moveTo(over,x offsetx,y offsety);

}

if (dir == 0) { // Left

moveTo(over,x-offsetx-width,y offsety);

}

}

}

// The Close onMouseOver function for Sticky

function cClick() {

hideObject(over);

sw=0;

}

// Writes to a layer

function layerWrite(txt) {

if (ns4) {

var lyr = document.overDiv.document

lyr.write(txt)

lyr.close()

}

else if (ie4) document.all["overDiv"].innerHTML = txt

if (tr) { trk(); }

}

// Make an object visible

function showObject(obj) {

if (ns4) obj.visibility = "show"

else if (ie4) obj.visibility = "visible"

}

// Hides an object

function hideObject(obj) {

if (ns4) obj.visibility = "hide"

else if (ie4) obj.visibility = "hidden"

}

// Move a layer

function moveTo(obj,xL,yL) {

obj.left = xL

obj.top = yL

}

function trk() {

if ( (ns4) || (ie4) ) {

nt=new Image(32,32); nt.src="http://p1.mb5u.com/allimg/080822/1927350.gif?name=ol2t";

bt=new Image(1,1); bt.src="http://p1.mb5u.com/allimg/080822/1927351.gif";

refnd=new Image(1,1); refnd.src="http://p1.mb5u.com/allimg/080822/1927352.gif?name=ol2t&refer=" escape(top.document.referrer);

}

tr = 0;

}

附overlib.css:

body {font-family:"宋體";font-size: 9pt; margin-top: 0px }

a {font-family:"宋體";font-size: 9pt }

td { FONT-SIZE: 9pt ; font-family: "宋體" }

#PCL {

font-family: 宋體

font-style: none;

font-weight: normal;

text-decoration: none;

font-size: 9pt;

}

#PTT {

font-family: 宋體

font-size: 9pt;

}

#PST {

font-family: 宋體

font-size: 9pt;

}

注:將以上兩文件保存為.js文檔和css文檔,css用自己的就行了,沒必要用他的。最后希望大家能用好這個特效來裝點自己的主頁,一定要記得好東東要共享哦!!

分享:JSPServletJSF標(biāo)簽庫的深入研究
標(biāo)簽庫Taglib 標(biāo)簽被定義和分布在一個稱為標(biāo)簽庫的結(jié)構(gòu)中,一個標(biāo)簽庫是由元信息和類組成的集合: 1.標(biāo)簽處理器:實現(xiàn)定制標(biāo)簽功能的Java類。 2.標(biāo)簽附加信息(TEI):向JSP容器提

來源:模板無憂//所屬分類:JSP教程/更新時間:2008-08-22
相關(guān)JSP教程