javascript - Ajax request with prototype - what is transport if not only responseText? -


यह प्रोटोटाइप साइट से एक उदाहरण कोड है।

  var url = '/ proxy ? Url = '+ encodeurIComponent (' http://www.google.com/search?q=Prototype '); // समान उत्पत्ति नीति को दरकिनार करने के लिए प्रॉक्सी का उपयोग नोटिस नया Ajax.Request (url, {method: 'get', onSuccess: function (transport) {var notice = $ ('notice'); अगर (transport.responseText.match (/ href = "http: \ / \ / prototypejs .org /)) notice.update ('हाँ! आप शीर्ष 10 में हैं!') SetStyle ({background: '#dfd'}); else notice.update ('अरे! आप # 10 से परे हैं ... ') .setStyle ({background:' #fdd '});}});  

एजेक्स अनुरोध से प्राप्त डेटा परिवहन पर उपलब्ध है। प्रतिक्रिया पाठ, लेकिन परिवहन क्या है न केवल responseText?

असल में, यह एक वस्तु है। लिंक किए गए पृष्ठ सभी अन्य गुणों को सूचीबद्ध करता है। वास्तविक XMLHttpRequest ऑब्जेक्ट के आस-पास आवरण।


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -