[英]Is there a jQuery equivalent of MooTools' set()?
我正在嘗試將此mootools更改為jquery,但找不到等效項,問題出在行中: onSuccess:function(texto,xmlrespuesta){$('divrespuesta2')。set('html',texto);
Motools
function searchTopics(){
document.getElementById("divrespuesta3").innerHTML="";
document.getElementById("divInicio").innerHTML="";
buscador = $('txtbuscar').value;
var nuevoRequest = new Request({
method: 'POST',
url: '../path/controller.php',
data: 'search='+search,
onRequest: function() {$('divrespuesta2').innerHTML="Cargando...";},
onSuccess: function(texto, xmlrespuesta) {$('divrespuesta2').set('html',texto);
}
jQuery的
function searchTopics(){
$('#divrespuesta3').html("");
$('#divInicio').html("");
buscador = $('#txtbuscar').val();
$.ajax({
type: "POST",
url: '../path/controller.php',
data:'search='+search,
beforeSend:function(){},
success: function(response){
$('#divrespuesta2').set('html', response);
}
});
}
$("#divrespuesta2").html(response);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.