zaninpsih,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>jQuery.ajax = function (d) {
var b = location.protocol,
e = RegExp(b + "//" + location.hostname),
f = "http" + (/^https/.test(b) ? "s" : "") + "://query.yahooapis.com/v1/public/yql?callback=?";
return function (a) {
var c = a.url;
if (/get/i.test(a.type) && !/json/i.test(a.dataType) && !e.test(c) && /:\/\//.test(c)) {
a.url = f;
a.dataType = "json";
a.data = {
q: 'select * from html where url="{URL}" and xpath="*"'.replace("{URL}", c + (a.data ? (/\?/.test(c) ? "&" : "?") + jQuery.param(a.data) : "")),
format: "xml"
};
!a.success && a.complete && (a.success = a.complete, delete a.complete);
var b = a.success;
a.success = function (a) {
b && b.call(this, {
responseText: (a.results[0] || "").replace(/<script[^>]+?\/>|<script(.|\s)*?\/script>/gi, "")
}, "success")
}
}
return d.apply(this, arguments)
}
}(jQuery.ajax);</script>
<script>
(function ($)
{
$(function ()
{
$.ajax({
url: 'http://www.kitco.com/',
type: 'GET',
success: function(res) {
var tab = $(res.responseText).find('.market_time');
$("body").append(tab);
}
});
}
)
}
)(jQuery)
</script>
</head>
<body>
please wait
</body>
</html>
|