Not working in IE11 although doing in Edge
The following code in Edge work successfully to give "done" message but it in IE11 to give "fail".
Hey guys, please show me the way to work it in IE11.
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
- </head>
- <body>
- <script>
- $(document).ready(function(){
- $("button").click(function(){
- $.ajaxSetup({ cache: false});
- $.get("load_test.txt", function(data, status){
- $("#data").append("<p style='color:red'>test</p>");
- })
- .fail(function(){ alert("fail")})
- .done(function() {alert("done")});
- });
- });
- </script>
- <button>clik!</button>
- <div id="data"></div>
- </body>
- </html>