function openWindow(){
confirm("xxxxxxx");
if (???){
document.write("'xxxx'xxx")如代码所示,目前没有把confirm赋值给一个变量,那么此时if中的判断语句该怎么写?或者说必须要对confirm进行赋值才可以?
2 回答
已采纳
卡迪亚兹
TA贡献24条经验 获得超8个赞
function openWindow(){
if(confirm("xxxxxxx")){
document.write("'xxxx'xxx") //这里写点确定时候的代码
}else{
//这里写点取消时候的代码
}你直接把confirm写在判断里面就可以了。。
添加回答
举报
0/150
提交
取消
