News:
<span id="span1">Text</span>
You need replace the contents of the span with HTML that you download from a URL specified by a global variable named localURL. Which code segment should you use?
$.ajax({ type: "GET", url: localURL, dataType: "jsonp", success: function(htmlText) { $("#span1").text(htmlText); } });
$.ajax(localURL, {}, function(htmlText) { $("#span1").html(htmlText); }, "html");
$.ajax({ type: "GET", url: localURL, dataType: "html", success: function(htmlText) { $("#span1").innerHTML = htmlText; } });
$.ajax({ type: "GET", url: localURL, success: function(htmlText) { $("#span1").html(htmlText); } });