I have a url (example: http://google.com), How can I get the content using the Javascript and store the content to created object(String).
Example html:
<html>
<head>
<title>testing</title>
</head>
<body>
<h1>testing1</h1>
<h2>testing2</h2>
<table>
<tr>
<th>Title1</th>
<th>Title2</th>
</tr>
<tr>
<td>testing3</td>
<td>testing4</td>
</tr>
</table>
</body>
</html>
html content to String:
<script>
var object = urlContent //MARK: urlContent will be html content
console.log(urlContent);
//Result: <h1>testing1</h1><h2>testing2</h2><table><tr><th>Title1</th><th>Title2</th></tr><tr><td>testing3</td><td>testing4</td></tr></table>
</script>