chengqiang1992
V2EX  ›  问与答

我真是要疯了。求大伙进来指教一点 JS 入门的东西。

  •  
  •   chengqiang1992 · Jul 29, 2015 · 2417 views
    This topic created in 4117 days ago, the information mentioned may be changed or developed.
    /* var age = 15;
    if( age >= 18) {
    alert('adult');
    }else{
    alert('teenger');
    }*/
    alert('去你妹的JS');

    为什么去你妹的JS不会有提示。
    7 replies  •  2015-07-29 14:40:23 +08:00
    Sabermadao
    Sabermadao
    Jul 29, 2015❤️1
    1
    可以啊 我试了一下 你再弄弄
    chengqiang1992
    chengqiang1992
    OP
    Jul 29, 2015
    2
    @Sabermadao 我的环境是Win下的文本编辑器。一切注释都没有效果。真是要疯了。
    Sabermadao
    Sabermadao
    Jul 29, 2015
    3
    不知你所说的提示是啥?难道不是弹出一个框??反正我试了能弹出框
    b821025551b
    b821025551b
    Jul 29, 2015
    4
    @chengqiang1992 chrome的console可用。顺便说下win的话远离自带文本编辑器
    chengqiang1992
    chengqiang1992
    OP
    Jul 29, 2015
    5
    @Sabermadao 谢谢你啊,我说的也是弹出一个框。但是在我这不能弹出框。
    chengqiang1992
    chengqiang1992
    OP
    Jul 29, 2015
    6
    @b821025551b 谢谢。懂了。
    Sabermadao
    Sabermadao
    Jul 29, 2015
    7
    @chengqiang1992
    <!DOCTYPE html>
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=gkb"/>
    </head>
    <body>
    <script type="text/javascript">
    /*var age = 15;
    if( age >= 18) {
    alert('adult');
    }else{
    alert('teenger');
    }*/
    alert('去你妹的JS');
    </script>
    </body>
    </html>
    不知道楼主学过HTML了么?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2747 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 13:58 · PVG 21:58 · LAX 05:58 · JFK 08:58
    ♥ Do have faith in what you're doing.