How do I pop up an alert in Javascript?

前端 未结 9 862
半阙折子戏
半阙折子戏 2021-01-19 16:03

How do I pop up an alert in Javascript?

I tried alert\"HELLO\" but that didn\'t work.

Can someone tell me the correct syntax?

Oh by the

相关标签:
9条回答
  • 2021-01-19 16:59

    Just add parantheses

    alert("Hello");
    
    0 讨论(0)
  • 2021-01-19 17:01
    <script type="text/javascript" >
      alert("hello");
    </script>
    
    0 讨论(0)
  • 2021-01-19 17:03

    Just add parentheses and enclosed it within the script tag.

    <script type="text/javascript" >
      alert("hello");
    </script>
    
    0 讨论(0)
提交回复
热议问题