write a js codeit can make page show alert
Sure, here's a simple JavaScript code that will make an alert box appear when the page loads:
window.onload = function() {
alert("Hello, world!");
}
This code uses the window.onload event to trigger the alert() function when the page has finished loading. The alert box will display a message that says "Hello, world!".
You can customize the message by changing the text inside the alert() function to whatever you like.
原文地址: https://www.cveoy.top/t/topic/bunQ 著作权归作者所有。请勿转载和采集!