I want to add more than one site ,, i'm try to rewrite the code and change link " req.open" and noting is done. any help ? i'm Essential at JavaScript. thanks
<html>
<head>
<title>Testing Purposes</title>
<script lang="javascript">
function ready() {
var hell = document.getElementById('hell');
var req = new XMLHttpRequest();
req.open('GET', 'load.php?http://www.140online.com/product/25965/%20%D8%AA%D9%82%D8%B7%D9%8A%D8%B9%20%D9%84%D9%8A%D8%B2%D8%B1', false);
req.send(null);
if(req.status == 200) {
var html_str = req.responseText;
var doc = document.createElement('html');
doc.innerHTML = html_str;
var divs = doc.getElementsByClassName('row-fluid');
for (i = 0; i < divs.length; i++) {
hell.innerHTML = hell.innerHTML +
"<h2>Found:</h2>" +
divs[i].innerText +
"<br />";
}
} else {
alert("Failed to load the page!");
}
}
</script>
</head>
<body onload="ready();">
<div id='hell'>
</div>
</body>