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.

write a js codeit can make page show alert

原文地址: https://www.cveoy.top/t/topic/bunQ 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录