简体   繁体   中英

Javascript on Internet Explorer (spring mvc thymeleaf project)

Okey!

So I am running a Spring MVC Thymeleaf project. I have a simple alert which should show each time when I start my site. This works perfectly except for when I try it with Explorer (IE11). Tried on Chrome, Edge, Firefox.

Its a very simple "alert ("hello")" in document.ready I tried to "allow javascript" on internet explorer. It still doesnt work, i tried if javascript is allowed by going to different sites.

Hmmm what more could be more relevant.

I tried to ad localhost to "trusted" sites, doesnt work. I tried the code on jfiddle and sites like this, works a treat.

I have localhost so the site is not "secure" obv, this is not the problem because I have tried the code on the host aswel. I have googled and tried but I cant do more than I've done... Nothing seems to work.

Anyone out there with the same problem? Thanks.

You can try by checking following.

  1. Ensure your console doesn't show any errors and correct them if there are any.
  2. Be sure you didn't disable browser prompts on IE
  3. Try using window.alert() - it's possible (though improbable) that another alert() is conflicting with window 's.
  4. If you have console support, try console.log(alert); and see what it says. It should be something like:

     function alert() { [native code] } 

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