简体   繁体   中英

How to fire a function immediately?

I'm going to display a "please enable javascript" message to my site which will be hidden by javascript.

-> WORKS!

-> PROBLEM:

I use Dojo so I tried with dojo.addOnLoad, but the message will not dissapear immediately after you visit the site, it will disapear when the site finished loading. That sucks for users which actually have js enabled, because the message will be visible to them. So it seems like I missed smthing very basically.

please help! Thx in advance!

您应该将消息放在<noscript>标记中。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM