Показать сообщение отдельно
  #10 (permalink)  
Старый 14.02.2014, 05:49
Аватар для рони
Профессор
Отправить личное сообщение для рони Посмотреть профиль Найти все сообщения от рони
 
Регистрация: 27.05.2010
Сообщений: 33,075


<!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://st1.bbcorp.ru/style/Mybb_Bend/Mybb_Bend.css',
    type: 'GET',
    success: function(res) {
        var div = $('<div/>',{html:res.responseText});
        $("#test").html(div.find('p').html());
    }
});
       }
      )
    }
  )(jQuery)
  </script>
</head>

<body>
<div id="test">please wait</div>

</body>
</html>
Ответить с цитированием