0088 JavaScript input and output statements: alert, console.log, prompt

In order to facilitate the input and output information, JS provides some input output statement, the statements which commonly follows:

method Explanation Attributable
alert(msg) Browser pop-up alert box Browser
console.log(msg) Browser console printout information Browser
prompt(info) Browser popup input box, the user can enter Browser
  • Note: alert () is mainly used to display messages to the user, console.log () messages to the programmer to see their own operation.

Guess you like

Origin www.cnblogs.com/jianjie/p/12127358.html