0

I have a small html trying to get the content of other website using javascript. Please help to see where the problem is:

<!-- saved from url=(0014)about:internet -->
<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=8; IE=7; IE=EDGE" charset="utf-8">
        <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.0/themes/base/jquery-ui.css"></link>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>

    <script>
        function displayData() {
            $.get('http://www.w3schools.com/json/myTutorials.txt', function(responseText) {
                alert(responseText);
            });
        }
    </script>
</head>

<body>
    <div id="menu">
        <button type="button" id="btnDisplay" onclick="displayData()">Go</button>
    </div>
</body>
</html> 
Xin Jin
  • 65
  • 1
  • 6

0 Answers0