<script>
function alertMsg(Obj,Id)
{
if(Obj.selectedIndex=="3")
{
if(confirm("设置为无效订单后,此订单将不可再操作"))
{
window.location.href="?sate="+Obj.selectedIndex+"&orderId="+Id;
}
else
{
Obj.selectedIndex=0; //放弃选择让option 还原
return;
}
}else
{
window.location.href="?sate="+Obj.selectedIndex+"&orderId="+Id;
}
}
</script>这段代码如何改进一下
我不想出现两次 window.location.href="?sate="+Obj.selectedIndex+"&orderId="+Id;
function alertMsg(Obj,Id)
{
if(Obj.selectedIndex=="3")
{
if(confirm("设置为无效订单后,此订单将不可再操作"))
{
window.location.href="?sate="+Obj.selectedIndex+"&orderId="+Id;
}
else
{
Obj.selectedIndex=0; //放弃选择让option 还原
return;
}
}else
{
window.location.href="?sate="+Obj.selectedIndex+"&orderId="+Id;
}
}
</script>这段代码如何改进一下
我不想出现两次 window.location.href="?sate="+Obj.selectedIndex+"&orderId="+Id;
解决方案 »
- 新手求助$("area[name=值]")
- jquery 在 hover(或mouseover+mouseout) 中使用 offset的问题
- 请教一个jQuery点击顺序的问题!
- 请假如何获得frameset中滚动条位置
- 菜鸟问题,帮帮小弟。
- 求一个check的正则表达式
- 关于在Safari中向xsl传递dom的一个问题
- 最外层的DIV让它透明,内部嵌套的DIV让它不透明如何写样式
- 关于 wanghr100(灰豆宝宝.net) 的“利用XMLHTTP无刷新获取数据“
- 如何让用户选择是否保存密码?(急用)
- mubeibei我知道字体怎么小了!
- jquery1.3.2 判断哪些复选框选中, 奇怪的问题。
{
if(Obj.selectedIndex=="3") && (!(confirm("设置为无效订单后,此订单将不可再操作")))
{
if(confirm("设置为无效订单后,此订单将不可再操作"))
{
Obj.selectedIndex=0; //放弃选择让option 还原
return;
}
else
{
window.location.href="?sate="+Obj.selectedIndex+"&orderId="+Id;
}
}
{
if(Obj.selectedIndex=="3") && (!(confirm("设置为无效订单后,此订单将不可再操作")))
{
Obj.selectedIndex=0; //放弃选择让option 还原
return;
}
else
{
window.location.href="?sate="+Obj.selectedIndex+"&orderId="+Id;
}
}
<script>
function alertMsg(Obj,Id)
{
if(Obj.selectedIndex=="3")
{
if(confirm("设置为无效订单后,此订单将不可再操作"))
{
window.location.href="?sate="+Obj.selectedIndex+"&orderId="+Id;
return;
}
else
{
Obj.selectedIndex=0; //放弃选择让option 还原
return;
}
}
else
{
window.location.href="?sate="+Obj.selectedIndex+"&orderId="+Id;
}
}
</script>