That's the property of the Browser you're using & You can't modify. Instead You can use a custom javascript alert box.
jQuery Alert Dialog
Answer from Jenson M John on Stack OverflowYou can't manipulate that.
Maybe you take a look at these bastards called modal popups, if youre able to use jQuery.
- http://jquery.iceburg.net/jqModal/
There are non-jquery options, too, of course.
I'd advise you not to use "alert". Use something that allows you to style it yourself, e.g., jQuery Dialog. You can make that modal if necessary (follow the links on the right of the page I sent for add'l examples).
Script order matters. You need to load jQuery before you load your script because your script relies on jQuery.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<script type="text/javascript" src="movieList.js"></script>
If you were to open your javascript console in your browser (Ctrl Shift J), you'd probably see an error saying something like $ is not a function.
If there are no errors, perhaps you've suppressed alerts for the page. Try replacing
alert('something');
With
console.log('something');
And keep an eye on your javascript console to see if the message gets printed. If it shows up, you've probably disabled alerts. To fix this, close and re-open the tab. It's recommended you use console.log() over alert() for debugging since alerts and other prompts can cause weird timing issues because of how they interrupt the javascript execution.
JQuery First
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<script type="text/javascript" src="movieList.js"></script>