JavaScript学习_confirm&prompt

Copy the code
Copy the code
        <Script type = "text / JavaScript"> 
            MSG = Confirm ( "learned whether H5"); 
             the console.log (MSG); 
            name = prompt ( "Please enter a message"); 
            document.write ( "name"); 
        < / script>
Copy the code
Copy the code

1.confirm pop OK and Cancel buttons

2.prompt input box pops up

Guess you like

Origin www.cnblogs.com/MySweetheart/p/12286768.html