复制代码 代码如下:

方法一:
[javascript]

js决断undefined变量类型直接用

$(this).css(“top”,position.y+”px”);
$(this).css(“left”,position.x+”px”);

flashObject.stop();
[javascript] 
document.getElementById(popupcontent).stop(); 

if(mydata==’undefined’){
alert(“未定义”);
}

复制代码 代码如下:

复制代码 代码如下:

复制代码 代码如下:
if(mydata==’undefined’){ alert(“未定义”); } 这是个异常的低等的不当,这么使:
复制代码 代码如下…

$(function() {

    popUp.innerHTML=”; 

那是个异常低等的失实,这么使:

//菜单列表
var menu_list=$(“.menu-list”);

[javascript] 复制代码 代码如下:
function hidePopup(){ var popUp =
document.getElementById(“popupcontent”); popUp.innerHTML=”;
popUp.style.visibility = “hidden”…

if(typeof(mydata)==’undefined’){
alert(“未定义”);
}

<div class=”menu”>

    popUp.style.visibility = “hidden”;   

 

复制代码 代码如下:

</div>

function hidePopup(){    
    var popUp = document.getElementById(“popupcontent”); 

复制代码 代码如下:

$(“.content-menu”).hide();
});
});
//主次因素排列Logo部分
function arrange(){
var ul=$(“.icons”);
var working=$(“.working”);
//地点坐标
var
position={x:0,y:0,bottom:110,width:50,height:50,parent:{height:0,width:0},padding:{top:10,left:10,right:0,bottom:10}};

复制代码 代码如下:

$(“.icons li”).mousedown(function(){
$(“.icons li”).removeClass(“icons-focus”);
$(this).addClass(“icons-focus”);
//更换近日的目录
$(“.icons li”).css(“z-index”,0);
$(this).css(“z-index”,1);
});

方法二

<!DOCTYPE HTML PUBLIC “-//IETF//DTD LEVEL1//EN”>
<html>
<head>
<title>index.html</title>

$(window).resize(function() {
arrange();
});

if(position.y>=position.parent.height-position.bottom){
position.y=0;
position.x=position.x+position.width+position.padding.left;
}
});
}

//alert(“可视中度:”+height+”,鼠标中度:”+y);
menu.css(“top”,y);
menu.css(“left”,x);
menu.show();

倘若急需方方面面效益,请引进jquery-ui和jquery-ui.css 截图: js代码:
复制代码 代码如下: $(function() { //菜单列表 var menu_list=$…

<div class=”window” title=”窗体”>窗体</div>

<div class=”taskbar”>
<div class=”menu-list”>
<ul>
<li></li>
</ul>
</div>

}
break;
default:
break;
}

//回车张开选中的Logo
if(event.keyCode==ENTER){
var open=$(“.icons-focus”);
alert(“ok enevt is enter”);
}

var x=event.clientX;
var y=event.clientY;
var menu=$(“.content-menu”);

</div>

@CHARSET “UTF-8”;
body, html {
overflow: hidden;
height: 100%;
width: 100%;
margin: 0px;
padding: 0px;
}
.working {
height: 100%;
width: 100%;
background-image: url(“../images/untitled.png”);
background-repeat: no-repeat;
background-color: rgb(235, 236, 238);
padding: 20px;
}
.working ul {
height: 100%;
position: relative;
}
.working ul li {
position: absolute;
display: block;
width: 90px;
height: 90px;
text-align: center;
margin: 0px 10px 10px 10px;
float: left;
border: inherit 1px inherit;
overflow: hidden;
cursor: pointer;
}
.taskbar {
position: absolute;
height: 35px;
line-height: 35px;
width: 100%;
bottom: 0px;
background-color: #CCC;
z-index: 999;
filter: alpha(opacity = 80);
opacity: 0.8;
padding: 0px 10px;
}
.menu {
display: block;
width: 50px;
height: 30px;
float: left;
}
.menu-list {
position: absolute;
left: 0px;
bottom: 35px;
width: 350px;
height: 500px;
border: #CCC 1px solid;
background-color: white;
filter: alpha(opacity = 90);
opacity: 0.9;
border-radius: 5px;
display: none;
}
ul {
margin: 0px;
padding: 0px;
}
.menu-icon {
cursor: pointer;
}
.menu-icon ul li {
display: block;
width: 15px;
height: 15px;
float: left;
margin: 1px;
background-color: white;
border-radius: 3px;
}
.menu-icon:hover li {
background-color: red;
}
.icons li img {
max-height: 70px;
max-width: 90px;
}
.text {
position: static;
height: 20px;
line-height: 20px;
width: 100%;
margin: 0px;
font-size: 12px;
font-family: 微软雅黑;
color: white;
}
.icons-move {
border: rgb(161, 194, 219) 1px solid;
background-color: rgb(194, 208, 226);
filter: alpha(opacity = 60);
opacity: 0.6;
border-radius: 3px;
}
.icons-focus {
border: rgb(161, 194, 219) 1px solid;
background-color: rgb(194, 208, 226);
filter: alpha(opacity = 100);
opacity: 1;
border-radius: 3px;
}
.window {
height: 200px;
width: 200px;
border: #CCC 1px solid;
background-color: white;
border-radius: 5px;
position: absolute;
top: 0px;
z-index: 10;
}
/*
* 右键菜单
*/
.content-menu {
position: absolute;
width: 150px;
height: auto;
background-color: rgb(255, 255, 255);
border: #CCC 1px solid;
display: none;
border-radius:5px;
z-index:999;
}
.content-menu ul {
margin: 0px;
padding: 0px;
}
.content-menu ul li {
list-style: none;
line-height: 30px;
height: 30px;
margin: 3px 0px;
padding:0px;
font-size: 13px;
}
.content-menu ul li a{
text-decoration:none;
display:block;
font-family: 微软雅黑;
padding:0px 5px;
width:140px;
height:100%;
color: #333;
outline:none;

发表评论

电子邮件地址不会被公开。 必填项已用*标注