Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- URL yahoo = new URL("http://www.stackoverflow.com/");
- BufferedReader in = new BufferedReader(
- new InputStreamReader(
- yahoo.openStream()));
- String inputLine;
- while ((inputLine = in.readLine()) != null)
- System.out.println(inputLine);
- in.close();
- <script>
- function dosubmit() {
- var url = document.getElementById("url-input").value;
- $.ajax({
- url:url,
- crossOrigin: true,
- success: function(response){
- alert(response);
- },
- error: function (XMLHttpRequest, textStatus, errorThrown) {
- alert(errorThrown);
- }
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement