JS input and output statement

input output statement

1. prompt(info): The browser explores the input box, and the user can enter

  <script>
    //这是一个输入框
      prompt('请输入你的年龄');
  </script>

Effect:
insert image description here
2. alert: The browser pops up an alert box

  <script>
    //这是一个输入框
      alert('我是大美人');
  </script>

The effect is:
insert image description here
3. console.log browser console printout message

<script>
    
    console.log('我是大美人');
  </script>

The effect is as follows:
insert image description here

Guess you like

Origin blog.csdn.net/qq_46161529/article/details/128477839