yuwei201
(yuwei201)
新手上路

初级会员
UID 65381
精华
0
积分 28
帖子 22
金钱 28 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2005-8-2
状态 离线
|
[广告]: Enom域名自助付费 自助注册 自助PUSH 主流域名COM等一律57.99元年
超级难的js判断问题
5个页面:data.html op.html unit.html batch.html slab.html
data.html:
<frameset name="pdi" rows="50,*" frameborder="yes" border="0" framespacing="0">
<frame name="oper" scrolling="no" border=0 framespacing=0 src="op.html">
<frameset name="main" cols="105,*" frameborder="yes" border="0" framespacing="0">
<frame name="unit" scrolling="no" framespacing=1 src="unit.html">
<frameset name="right" rows="50%,*" frameborder="yes" border="0" framespacing="0">
<frame name="batch" scrolling="auto" framespacing=1 src="batch.html">
<frame name="slab" scrolling="auto" framespacing=1 src="slab.html">
</frameset>
op.html:
<form name='op_form' method=post>
<input type=button name=input1 value='修改' onclick='test("edit");'>
<input type=button name=input1 value='删除' onclick='test("del");'>
</form>
<SCRIPT LANGUAGE="JavaScript">
function test(action) {
//难题就是这儿!
}
</SCRIPT>
unit.html:
<form name='unit_form' method=post>
<input type=checkbox name=unit[] value="aa">aa
<input type=checkbox name=unit[] value="bb">bb
<input type=checkbox name=unit[] value="cc">cc
</form>
<form name='unit_form2' method=post>
<input type=button name=input value='unitbutton'>
</form>
batch.html:
<form name='batch_form2' method=post >
<input type=button name=input value='batchbutton'>
</form>
<form name='batch_form' method=post>
<input type=checkbox name=batch[] value="abc">abc
<input type=checkbox name=batch[] value="zefe">zefe
<input type=checkbox name=batch[] value="ah">ah
</form>
slab.html:
<form name='slab_form2' method=post>
<input type=button name=input value='slabbutton'>
</form>
<form name='slab_form' method=post>
<input type=checkbox name=slab[] value="aabb">aabb
<input type=checkbox name=slab[] value="acbe">acbe
<input type=checkbox name=slab[] value="zghe">zghe
</form>
这5个页面中,data.html是总框架,op.html是操作(删除、修改)页面;余下3个页面是显示页面。op.html页面要实现下列功能(js):
1.无论是删除还是修改操作,所选择的复选框只能出自于一个框架页面内(比如unit框架);
2.删除操作:可以多选(但是遵循条件1),不能不选,弹出确认删除提示框;
3.修改操作:只能单选,不能不选;
个人感觉页面比较多,而且涉及到的对象不是只在一个框架内,导致问题比较复杂,但还是相信各位高手能够接受这个挑战,搞定这个问题!小弟感激不尽!
[ 本帖最后由 yuwei201 于 2007-6-7 10:51 PM 编辑 ]
|
|