$(function () { var _SeatAll = []; var _Seated = []; // 显示 $.each(_SeatAll, function (key, val) { //回调函数有两个参数,第一个是元素索引,第二个为当前值 switch (_Seated[key]) { case "0": $('#' + val).bind('click',{key:key},DoomSeat); $('#' + val).css("cursor", "pointer"); $('#' + val).attr("title", "点击预定"); break; case "1": //预定 $('#' + val).css("background", "yellow"); break; case "2": //已定 $('#' + val).css("background", "#ff6600"); break; default: break; } }); }) // 预定 function DoomSeat(event) { var _DID = []; var DetailID = _DID[event.data.key]; window.open('/ColligateManage/StallCompanyInsertTwo.aspx?DetailID=' + DetailID,'','width=600,height=600,top=0,left=0 scrollbars=yes'); } // 预定导航漂浮图标 function scall(){ document.getElementById("Javascript.Div4").style.top=(document.documentElement.scrollTop)+"px"; document.getElementById("Javascript.Div4").style.left=(document.documentElement.scrollLeft+document.documentElement.clientWidth-document.getElementById("Javascript.Div4").offsetWidth)+"px"; } window.onscroll=scall; window.onresize=scall; window.onload=scall;