<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="styles/aqua.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="styles/my.css" />
<script type="text/javascript" src="scripts/prototype-1.4.0.js"></script>
<script type="text/javascript" src="scripts/my.js"></script>
</head><body>
<p>&nbsp;Mailing Address:</p>
<br />
<input type="button" value="go" name="go" id="go" onclick="go();" /><br />
<div id="openDiv" class="aepi">
<table id="openDivTable" width="450" border="0" height="500">
<tr>
<td width="220" height="64" align="center" valign="middle">Select one option below: </td>
<td width="220"><form name="form1" method="post" action="">
<p>
<input name="button" type="button" id="buttonCancel" width="30" value="Cancel" onClick="cancel();">
<input name="button" type="button" id="buttonSave" width="30" value="Save" onClick="saveCorrectionPage();">
</p>
</form> </td>
</tr>
<tr>
<td colspan="2" height="30">
<form name="form2" method="post" action="">
<p>
<input type="radio" name="radiobutton" value="radiobutton">
Delete activities including and after </p>
<p id="activtiesDetail">&nbsp;&nbsp;<span class="STYLE18">08-11-2007 07:30:00 Change Appearance MARK</span></p>
<p id="activtiesDetailComment" > &nbsp;&nbsp;&nbsp;&nbsp;(maximum of 10 activities allowed) </p>
</form> </td>
</tr>
<tr>
<td colspan="2">
<form name="form2" method="post" action="">
<input type="radio" name="radiobutton" value="radiobutton">
Delete Attendance
</form> </td>
</tr>
<tr>
<td colspan="2">
<form name="form2" method="post" action="">
<p>
<input name="radiobutton" type="radio" id="addPoolAttendance" onClick="showValueField();" value="radiobutton" checked="checked">
Add Pool Attendance</p>
<p id="dateAddPoolAttendence">&nbsp;&nbsp;Date: </p>
<p id="locationAddPoolAttendence">&nbsp;&nbsp;Location:
</p>
</form>
</td>
</tr>
<tr>
<td colspan="2"><form name="form2" method="post" action="">
<p>
<input name="radiobutton" type="radio" id="changeReasonRadio" onClick="showReason();" value="radiobutton">
Change Renson </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;08-11-2007 07:30:00 Change Appearance MARK</p>
<p class="STYLE18">&nbsp;&nbsp;&nbsp;&nbsp;Rostpone</p>
<p id="reasonSelect">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;Reason:CC &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Childcare</p>
</form></td>
</tr>
<tr>
<td height="100%" colspan="2">&nbsp;</td>
</tr>
</table><p>
<input type="radio" name="10" value="单选" />
one<select name="select">
<option value="Childcare">CC</option>
<option value="Adult CareGiver">CG</option>
</select>
</p>
<p><br /><input type="radio" name="10" value="单选" />
two<select id="locationSelect" name="select"> <option value="GJ Grand Jury">GJ</option> <option value="Green Valley Justice Court">GRVJP</option> <option value="Pima Co.Superior Court">SVPCT</option> <option value="Tucson City Court">CITYCT</option> </select>
</p>
</div>
<input name="button" type="button" id="button" value="open" onclick="openDiv();" /></body>
</html>下面是my.css.aepi {
position:absolute;
left:800;
top:400;
width:600;
height:500;
z-index:20;
filter:alpha(opacity=50); /* IE */
background-color: #CCCCCC;
display:none
}下面是my.jsfunction cancel(){
window.close();
}function saveCorrectionPage(){
// save some data.window.close();
var displayMessage='0272 - The requested update was completed successfully. Some activities may note have been deleted due to related juror payment or activity.';
alert(displayMessage);
}
function mouseDown(ev){
ev= ev||window.event;
var target = ev.target || ev.srcElement;
if(target.id!='openDiv'&&target.parentNode.id!='openDiv'){
alert('id:'+target.parentNode.id+' tagname: '+target.parentNode.tagName );
// alert('you must close the div !');}}function go(){
alert('go');
}function openDiv(){
document.onmousedown=null;
document.onclick=null;
document.ondblclick=null;
document.onmousemove=null;
document.onmouseout=null;
document.onmouseover=null;
document.onmouseup=null;
document.onkeydown=null;
document.onkeypress=null;var openDiv=document.getElementById('openDiv');
openDiv.style.display="block";
var oDChilds=openDiv.childNodes;
for(var i=0;i<oDChilds.length;i++){
var oDChild=oDChilds[i];
alert('id:'+oDChild.tagName);
}
//openDiv.focus();//alert(openDiv.tagName);
}
我想问下就是在点击open按钮的时候打开一个div层,这时候我需要实现的效果,是除非点击save或者cancel按钮推出这个div层,否则鼠标点击(包括所有的事件)层之外的所有地方的事件都失去效果。说的简单点,就是只让在这个层上做操作,关闭这个层的时候,才可以操作别的页面。大家说这个怎么实现啊,跪求啦!很急的,解决了就结贴!