許愿墻中用到的函數(shù)
更新時(shí)間:2006年10月07日 00:00:00 作者:
復(fù)制代碼 代碼如下:
<script language="JavaScript1.2">
//-- 控制層刪除start of script -->
function ssdel(){
if (event)
{
lObj = event.srcElement ;
while (lObj && lObj.tagName != "DIV") lObj = lObj.parentElement ;
}
var id=lObj.id
document.getElementById(id).removeNode(true);
//document.getElementById(id).outerHTML="";//
}
//-- 控制層刪除End of script -->
</script>
<script>
//-- 控制層移動(dòng)start of script -->
var Obj=''
var index=10000;//z-index;
document.onmouseup=MUp
document.onmousemove=MMove
function MDown(Object){
Obj=Object.id
document.all(Obj).setCapture()
pX=event.x-document.all(Obj).style.pixelLeft;
pY=event.y-document.all(Obj).style.pixelTop;
}
function MMove(){
if(Obj!=''){
document.all(Obj).style.left=event.x-pX;
document.all(Obj).style.top=event.y-pY;
}
}
function MUp(){
if(Obj!=''){
document.all(Obj).releaseCapture();
Obj='';
}
}
function setTagBPic(i) {
picurl = getBPic(i);
getObj('tagBPic').style.background = " transparent url(\"" + picurl + "\") no-repeat scroll bottom left";
cf.tagbgpic.value = i;
}
function setTagBColor(i) {
color = getBColor(i);
getObj('preview').style.background = '' + color;
cf.tagbgcolor.value = i;
}
function getBPic(i) {
i = (i<1 || i>8)?1:i;
return "images/pic" + parseInt(parseInt(i)+27) +".gif";
}
//-- 控制層移動(dòng)end of script -->
//獲得焦點(diǎn);
function getFocus(obj)
{
if(obj.style.zIndex!=index)
{
index = index + 2;
var idx = index;
obj.style.zIndex=idx;
//obj.nextSibling.style.zIndex=idx-1;
}
}
相關(guān)文章
Canvas實(shí)現(xiàn)二娃翠花回家之路小游戲demo解析
這篇文章主要為大家介紹了Canvas實(shí)現(xiàn)二娃翠花回家之路小游戲demo解析,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2023-04-04JS實(shí)現(xiàn)查找數(shù)組中對(duì)象的屬性值是否存在示例
這篇文章主要介紹了JS實(shí)現(xiàn)查找數(shù)組中對(duì)象的屬性值是否存在,涉及javascript針對(duì)json數(shù)組的遍歷、查找相關(guān)操作技巧,需要的朋友可以參考下2019-05-05js中文逗號(hào)轉(zhuǎn)英文實(shí)現(xiàn)
中文逗號(hào)如何轉(zhuǎn)英文,下面為大家詳細(xì)介紹下,感興趣的朋友不要錯(cuò)過2014-02-02For循環(huán)中分號(hào)隔開的3部分的執(zhí)行順序探討
這篇文章主要探討了For循環(huán)中分號(hào)隔開的3部分的執(zhí)行順序,需要的朋友可以參考下2014-05-05谷歌瀏覽器 insertCell與appendChild的區(qū)別
table中增加單元格時(shí) 在谷歌瀏覽器中使用insertCell方法增加列時(shí),顯示結(jié)果的先后順序與程序執(zhí)行的先后順序相反2009-02-02JS實(shí)現(xiàn)類似51job上的地區(qū)選擇效果示例
這篇文章主要介紹了JS實(shí)現(xiàn)類似51job上的地區(qū)選擇效果,結(jié)合完整實(shí)例形式分析了javascript基于鼠標(biāo)事件響應(yīng)實(shí)現(xiàn)頁面元素動(dòng)態(tài)變換的相關(guān)操作技巧,需要的朋友可以參考下2016-11-11JS獲取今天是本月第幾周、本月共幾周、本月有多少天、是今年的第幾周、是今年的第幾天的示例代碼
這篇文章主要介紹了JS獲取今天是本月第幾周、本月共幾周、本月有多少天、是今年的第幾周、是今年的第幾天,本文通過實(shí)例代碼給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2018-12-12