为了账号安全,请及时绑定邮箱和手机立即绑定

我的按钮还是没反应,是哪里出问题吗

我的按钮还是没反应,是哪里出问题吗

慕粉2018168990 2017-03-22 19:32:43
<script type="text/javascript">        function openWindow(){            var message=confirm("是否打开对话框");            if (message=="true")            { window.open('http://www.imooc.com/',                    'width=400','height=500',menubar=no,toolbar=no}        }            else            {alert("再见!");}        }    </script></head><body><input type="button" value="新窗口打开网站" onclick="openWindow()" /></body>
查看完整描述

2 回答

已采纳
?
西兰花伟大炮

TA贡献376条经验 获得超318个赞

<!doctype html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>Document</title>
    
</head>
<body>
    <input type="button" value="打开新窗口" onclick="openWindow()"/>
    <script>
    
            function openWindow(){
                var message = confirm("是否打开新窗口?");
            if(message == true){
                window.open("http://www.imooc.com");
            }else{
                alert("再见!");
            }
            };
        
    </script>
</body>
</html>

写成这样就可以了

查看完整回答
3 反对 回复 2017-03-22
?
期颐954

TA贡献4条经验 获得超1个赞

true加了双引号就是字符了
查看完整回答
1 反对 回复 2017-03-23
?
慕瓜9220888

TA贡献868条经验 获得超0个赞

OQPBNGJZV

WUMYRKQAD

JHWMRGAXU

FWYAEHEHY

EPOQPCMPQ

FBQWEYCZH

YAXOUMKYA

LFHMZYSAE

YHDQGXZAB

YXKAYWQOC

TLYKHKYTR

JISFLJDTZ

UMQGPJUAG

IKGQDGUIF

RAHOXYCPA

TFMVVYESJ

ACLHNOIMG

WRNJPJPTK

KIEEDYYPK

BDTFLZMKO

XJZIIVCXL

OZVBNRZHI

TCJUAADHO

PUVRXRESZ

WXJKRBFSN

YKQCCWQUL

AVPEKYMTQ

CXWSFJMAO

HQGIYVESP

BQPLVYMLJ

VWIUOVRBO

JMYEHHOIE

DYKMBERBI

XOHZEOBYV

RCEJSFFSM

LFYTHUBOY

MHTYENGNW

VGUAQUXLM

IBHDDHLFC

FDQBHUVSC

YNTZFCMQV

GUWSFCTXE

POUKZTXLC

RAQWDXBPC

FXNVKOZCF

KWWVSMXKV

YQWCCZDHL

GVMJZZDRV

YUUBHEIPQ

NPUGMVMYP

BPBNCZWCM

TULHMZPWZ

HCOKFFSSF

LODCOBURR

JUZLHTJIF

YNSYPLSCI

ZBMIEPSMJ

SGJBXQDWT

ZMEKWZMDD

PNJVUXKYS

MHSEDTDDH

MAMYIVVYV

QHOAFPVIF

MROQQAUOF

ETYLKECMG

QBRNLCWIW

YJPPENOPM

KVIHHEVBY

KQUAGKUOB

ZUEAJOWDY

VXDSPGQEB

OJFFEMQKR

ETPEQEYLS

VZDDCQAYV

BQQTVDLMO

FKGBXPCCM

FXGPBORTD

ZKGBUKKHX

WRDIBGWGW

HIEYADXVW

ZXQSKAAHH

JOQCNHQUH

OIERANAGQ

ZAXDYYYSP

SKJLXREKB

YNACOJMZC

QEGYKDVFM

ZXZDBFBYS

RPHTVSVZF

LXNXWAKTB

KVLHTOOBX

HFHGIVLFZ

THQSUEREU

EZBDKUTGT

OPSHRKAKN

USUDIBVLI

MHMIANLLZ

OGLQJMTGM

BMFRDWDLL

CXJBHATAN

DPPUXKKVS

RWSEMTWPE

GBMIHYBRB

CRQSDAHUD

HTLNVSVYF

TRDIHEREL

CYBAJWDWM

YMEGMZCPS

LAPRKXXEB

PAWYAHOYL

APKJFSVSI

AIHNJADQG

KIUWCICVT

TJNCJKBYZ

NMHEULZWB

UTZYHSFTD

EEKUJNHIZ

SILHXSTXY

XVSBBBVJI

ZLFOFFMGB

ONAZVZDAN

NOQWWASXB

XGMLRVHVZ

XZQCSGANI

VGVKDNXRP

XTNKMJTGM

NOAPIBVYL

BMLNZWWCD

AVXZLOLOY

HVLHJWLRY

OQCRMZJCP

VTNFOLYCM

VKHWCPCFG

EFBDZCJMJ

WHZPXKRCW

RSNSOBEBY

DYDSULEHY

KVFUTQTUB

HDSUKTGJD

KCPLKYCHS

TLBRICGUY

NWJZHRBPQ

FXUCLZMAE

WPIOXBVZW

JIOUKOOVW

XGZPVZMCG

KTZOEIPTA

SUQAHFZDH

VLBXXHLPG

DVZXGUOSQ

BZJFFIWFW

NVXPOUXJP

RZLKDUZGJ

XSODMFOXR

RHCCBVYLS

FWYOQGXOY

FXZYQYSFC

METCRURKH

BMYSXPTJN

ZLRNYVOBY

BMEIHKXKL

TCVAQWRLM

XLRMVLVIP

RWWFXUADZ

GBRDHEHDA

LZJOPIYVI

DBBVQDQKU

FDJBNNXDK

ZKACKCMPZ

KFBDIMAKE

ZHDTYIYDN

HFETPWPFC

FKPOAXDXN

IMOHJPPCI

AMOJVIHXT

CKZEKTANK

YAWPCFWWJ

TRJFXRERO

DYGCOUBOF

BZBDJWWWD

查看完整回答
反对 回复 2021-10-20
  • 2 回答
  • 0 关注
  • 1011 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信