執著的笨蛋
黑暗的SH!灰暗的人生!
BlogJava
首頁
新隨筆
聯系
聚合
管理
隨筆 - 154 文章 - 60 trackbacks - 0
<
2007年12月
>
日
一
二
三
四
五
六
25
26
27
28
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
聲明:
該blog是為了收集資料,認識朋友,學習、提高技術,所以本blog的內容除非聲明,否則
一律為轉載
!!
感謝那些公開自己技術成果的高人們!!!
支持開源,尊重他人的勞動!!
常用鏈接
我的隨筆
我的文章
我的評論
我的參與
最新評論
留言簿
(3)
給我留言
查看公開留言
查看私人留言
隨筆分類
(148)
ajax&js(46)
DB(22)
html(11)
j2ee(11)
j2me(1)
j2se(43)
other(7)
xml(7)
隨筆檔案
(143)
2008年5月 (1)
2008年4月 (8)
2008年3月 (17)
2008年2月 (22)
2008年1月 (4)
2007年12月 (8)
2007年11月 (34)
2007年10月 (37)
2007年9月 (12)
收藏夾
(2)
ppp(2)
其他
學習(技術)
ander小明的blog
ander小明的blog
anotherbug的blog(北京)
DANCE WITH JAVA
MySQL 中文網
solol.org
任再旺(山東)
另一個
城市胡同
戴一波 CNBRUCE'S BLOG(布魯斯狼)
林信良(良葛格)
金色陽光
關注Eclipse,Ajax,Struts,Hibernate,Spring,Java,jsp,web service,計算機安全等信息。
觀察思考(非技術)
冉云飛
新語絲網站
新語絲論壇
羅永浩---傻逼老憤青
個人網站
羅永浩--牛博
牛博國際
搜索
最新評論
1.?re: javax.swing.JOptionPane.showMessageDialog() 方法
hdyjrt
--fjfjtu
2.?re: 頁面加載進度條(js)[未登錄]
13
--1
3.?re: swing使用進度條的一個例子(整理)[未登錄]
ddddd
--ddd
4.?re: 世界編程大賽頭名程序!(爆強)
輸入debug<1.txt 命令回車后,同時按ALT+Enter ,就是全屏顯示!的確很強很強!
--JQG
5.?re: java 讀xml文件例子[未登錄]
@hh
為什么只能讀取指定文檔而不是針對所有文檔都能讀取呢?這不是浪費代碼嗎?
--啦啦啦
閱讀排行榜
1.?javax.swing.JOptionPane.showMessageDialog() 方法 (17418)
2.?java 讀xml文件例子(14182)
3.?java操作Excel(Jakarta_POI)(10504)
4.?js table操作--------table滾動條(10124)
5.?java sax 解析 xml(9156)
評論排行榜
1.?js table操作 -------- 移動行(8)
2.?java操作Excel(Jakarta_POI)(8)
3.?高,高,html的頁面刷新(原創)(3)
4.?JavaScript類的繼承(3)
5.?javax.swing.JOptionPane.showMessageDialog() 方法 (3)
JavaScript實現AJAX的拖動效果-例子1
代碼:
<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"
>
<
html
>
<
head
>
<
meta
http-equiv
="Content-Type"
content
="text/html; charset=gb2312"
>
<
title
>
drag layer
</
title
>
<
style
>
body,table
{
}
{
color
:
#000000
;
font-size
:
12px
;
}
div.div_one
{
}
{}
.dragBar
{
}
{
color
:
#FFFFFF
;
font-weight
:
bold
}
</
style
>
<
script
language
="javascript"
defer
>
/**/
/*
written by joelee@51js
*/
var
tmpElement
=
null
;
var
dragElement
=
null
;
var
downX,downY,tmp_o_x,tmp_o_y;
var
refElement
=
null
;
var
dragActive
=
0
;
var
draging
=
0
;
function
readyDrag()
{
dragActive
=
1
;
if
(event.srcElement.tagName
!=
"
DIV
"
)
return
;
dragElement
=
event.srcElement.parentNode;
tmpElement
=
dragElement.cloneNode(
true
);
tmpElement.style.filter
=
"
alpha(opacity=90)
"
;
tmpElement.style.zIndex
=
2
;
dragElement.style.zIndex
=
1
;
tmpElement.style.position
=
"
absolute
"
;
if
(dragElement.parentNode.tagName
!=
"
BODY
"
)
{
dragElement.style.left
=
dragElement.offsetLeft
+
dragElement.parentNode.style.pixelLeft;
dragElement.style.top
=
dragElement.offsetTop
+
dragElement.parentNode.style.pixelTop;
}
downX
=
event.clientX;
downY
=
event.clientY;
tmp_o_x
=
dragElement.style.pixelLeft;
tmp_o_y
=
dragElement.style.pixelTop;
tmpElement.style.visibility
=
"
hidden
"
;
document.body.appendChild(tmpElement);
document.onmousemove
=
startDrag;
}
document.onmouseup
=
endDrag;
function
startDrag()
{
if
(dragActive
==
1
&&
event.button
==
1
&&
dragElement
!=
null
&&
tmpElement
!=
null
)
{
tmpElement.style.visibility
=
"
visible
"
;
tmpElement.style.left
=
tmp_o_x
+
event.clientX
-
downX;
tmpElement.style.top
=
tmp_o_y
+
event.clientY
-
downY;
dragElement.style.backgroundColor
=
"
#CCCCCC
"
;
document.body.style.cursor
=
"
move
"
;
draging
=
1
;
}
}
function
endDrag()
{
if
(dragActive
==
1
&&
tmpElement
!=
null
)
{
if
(draging
==
1
)
{
dragElement.removeNode(
true
);
draging
=
0
;
}
tmpElement.style.filter
=
"
alpha(opacity=100)
"
;
tmpElement.style.zIndex
=
1
;
document.body.style.cursor
=
"
default
"
;
if
(refElement
!=
null
&&
refElement.parentNode
!=
null
&&
refElement.parentNode.tagName
!=
"
BODY
"
)
{
tmpElement.style.width
=
refElement.parentNode.style.width;
tmpElement.style.position
=
""
;
refElement.parentNode.insertBefore(tmpElement,refElement);
}
}
dragElement
=
null
;
tmpElement
=
null
;
dragActive
=
0
;
}
function
readyInsert()
{
if
(dragActive
==
1
)
{
var
element
=
event.srcElement;
if
(element
==
dragElement)
return
;
if
(element.tagName
!=
"
DIV
"
)
return
;
if
(element.className
==
"
dragBar
"
||
element.className
==
"
textSheet
"
||
element.className
==
"
blankBar
"
)
element
=
element.parentNode;
element.style.backgroundColor
=
"
#CCCCCC
"
;
element.style.filter
=
"
alpha(opacity=50)
"
;
refElement
=
element;
}
}
function
failInsert()
{
var
element
=
event.srcElement;
if
(element.tagName
!=
"
DIV
"
)
return
;
try
{
if
(element.className
==
"
dragBar
"
||
element.className
==
"
textSheet
"
||
element.className
==
"
blankBar
"
)
element
=
element.parentNode;
}
catch
(e)
{}
element.style.filter
=
"
alpha(opacity=100)
"
;
element.style.backgroundColor
=
"
#FFFFFF
"
;
refElement
=
null
;
}
document.onselectstart
=
function
()
{
return
false
}
</
script
>
</
head
>
<
body
>
<
div
id
="div_one"
class
="div_one"
style
="position:absolute; left:116px; top:137px; width:433px; z-index:1; background-color: #FFFFFF; layer-background-color: #FFFFFF;"
onMouseOver
="readyInsert()"
onMouseOut
="failInsert()"
>
<
div
onMouseDown
="readyDrag()"
style
="cursor:move; border:1px solid #996666; background-color:#996666; height:20px"
name
="dragDIV"
class
="dragBar"
><
img
src
="snap_icon.gif"
width
="16"
height
="16"
>
Window
</
div
>
<
div
class
="textSheet"
style
="border:1px solid #996666;"
>
Content
<
br
>
Content
<
br
>
Content
<
br
>
Content
<
br
>
</
div
>
<
div
class
="blankBar"
style
="height:10px"
></
div
></
div
>
<
div
id
="grid1"
style
="position:absolute; left:534px; top:37px; width:336px; height:15px; z-index: 100; visibility: visible;"
>
<
div
style
="height:20px;z-index:2;"
onMouseOver
="readyInsert()"
onMouseOut
="failInsert();"
>
把層拖動到這兒
</
div
>
</
div
>
<
div
id
="grid2"
style
="position:absolute; left:20px; top:40px; width:494px; height:15px; z-index: 100; visibility: visible;"
>
<
div
style
="height:20px;z-index:2; background-image:url()"
onMouseOver
="readyInsert()"
onMouseOut
="failInsert();"
>
把層拖動到這兒
</
div
>
</
div
>
<
div
id
="div_one"
class
="div_one"
style
="position:absolute; left:204px; top:277px; width:433px; z-index:1; background-color: #FFFFFF; layer-background-color: #FFFFFF;"
onMouseOver
="readyInsert()"
onMouseOut
="failInsert()"
>
<
div
onMouseDown
="readyDrag()"
style
="cursor:move; border:1px solid #996666; background-color:#996666; height:20px"
name
="dragDIV"
class
="dragBar"
><
img
src
="snap_icon.gif"
width
="16"
height
="16"
>
BBS
</
div
>
<
div
class
="textSheet"
style
="border:1px solid #996666;"
>
Content
</
div
>
<
div
class
="blankBar"
style
="height:10px"
></
div
>
</
div
>
<
div
id
="div_one"
class
="div_one"
style
="position:absolute; left:561px; top:195px; width:433px; z-index:1; background-color: #FFFFFF; layer-background-color: #FFFFFF;"
onMouseOver
="readyInsert()"
onMouseOut
="failInsert()"
>
<
div
onMouseDown
="readyDrag()"
style
="cursor:move; border:1px solid #996666; background-color:#996666; height:20px"
name
="dragDIV"
class
="dragBar"
><
img
src
="snap_icon.gif"
width
="16"
height
="16"
>
Log
</
div
>
<
div
class
="textSheet"
style
="border:1px solid #996666;"
>
Content
<
br
>
Content
<
br
>
Content
<
br
>
Content
<
br
>
</
div
>
<
div
class
="blankBar"
style
="height:10px"
></
div
>
</
div
>
<
div
id
="div_one"
class
="div_one"
style
="position:absolute; left:438px; top:74px; width:433px; z-index:1; background-color: #FFFFFF; layer-background-color: #FFFFFF;"
onMouseOver
="readyInsert()"
onMouseOut
="failInsert()"
>
<
div
onMouseDown
="readyDrag()"
style
="cursor:move; border:1px solid #996666; background-color:#996666; height:20px"
name
="dragDIV"
class
="dragBar"
><
img
src
="snap_icon.gif"
width
="16"
height
="16"
>
Worker
</
div
>
<
div
class
="textSheet"
style
="border:1px solid #996666;"
>
Content
</
div
>
<
div
class
="blankBar"
style
="height:10px"
></
div
>
</
div
>
<
div
id
="div_one"
class
="div_one"
style
="position:absolute; left:206px; top:406px; width:433px; z-index:1; background-color: #FFFFFF; layer-background-color: #FFFFFF;"
onMouseOver
="readyInsert()"
onMouseOut
="failInsert()"
>
<
div
onMouseDown
="readyDrag()"
style
="cursor:move; border:1px solid #996666; background-color:#996666; height:20px"
name
="dragDIV"
class
="dragBar"
><
img
src
="snap_icon.gif"
width
="16"
height
="16"
>
Tools
</
div
>
<
div
class
="textSheet"
style
="border:1px solid #996666;"
>
Content
</
div
>
<
div
class
="blankBar"
style
="height:10px"
></
div
>
</
div
>
</
body
>
</
html
>
posted on 2007-12-06 11:32
lk
閱讀(438)
評論(0)
編輯
收藏
所屬分類:
ajax&js
、
html
新用戶注冊
刷新評論列表
只有注冊用戶
登錄
后才能發表評論。
網站導航:
博客園
IT新聞
Chat2DB
C++博客
博問
管理
相關文章:
[JS]Cookie精通之路
[轉]40種網頁常用小技巧----Ajax中國
如何使用Javascript格式化數字顯示
javascript函數(格式化數字,日期比較,光標處插入或修改文字,JS圖片動畫效果)
讓你的網頁更精彩 - Javascript 調用MSAgent
zoom.js 使用事例
[轉]js日期時間函數(經典+完善+實用)
js獲取 日期 星期 時間
JAVASCRIPT的常用技術
close window
Copyright ©2025 lk Powered by:
博客園
模板提供:
滬江博客
主站蜘蛛池模板:
免费在线看v网址
|
亚洲中文字幕久久精品无码APP
|
亚洲日本成本人观看
|
在线观看91精品国产不卡免费
|
亚洲一区二区三区免费
|
图图资源网亚洲综合网站
|
好大好深好猛好爽视频免费
|
五月天国产成人AV免费观看
|
亚洲黄色一级毛片
|
亚洲一级大黄大色毛片
|
免费观看午夜在线欧差毛片
|
成人性做爰aaa片免费看
|
亚洲精品中文字幕无码A片老
|
在线亚洲精品自拍
|
成人最新午夜免费视频
|
三级毛片在线免费观看
|
亚洲欧洲无卡二区视頻
|
亚洲av无码一区二区三区网站
|
岛国大片免费在线观看
|
日本在线看片免费
|
免费精品国自产拍在线播放
|
亚洲va中文字幕无码久久
|
成人免费无码大片A毛片抽搐色欲
|
GOGOGO免费观看国语
|
亚洲精品第一国产综合亚AV
|
久久精品亚洲日本佐佐木明希
|
免费永久在线观看黄网站
|
青青草a免费线观a
|
大地资源网高清在线观看免费
|
欧美日韩亚洲精品
|
亚洲国产日韩精品
|
久久精品国产亚洲AV麻豆网站
|
亚洲人成人网站在线观看
|
暖暖在线日本免费中文
|
99无码人妻一区二区三区免费
|
三上悠亚电影全集免费
|
曰韩无码AV片免费播放不卡
|
亚洲精品乱码久久久久久蜜桃图片
|
亚洲男女性高爱潮网站
|
无码欧精品亚洲日韩一区
|
亚洲中文字幕无码久久2017
|