How do you call a prompt on page load with jquery?

I cant seem to figure it out. This is what I have so far:

 <head>
  
  <script src="jquery-3.5.1.min.js"></script>
    var gamerName
    
    <script>
      $(document).ready(function(){
        gamerName = prompt("Please enter your name."," ");
    });
      
</script>  
    
    
  </head>

14 thoughts on “How do you call a prompt on page load with jquery?”

Leave a Comment