[英]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.