Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Jquery语法等价_Javascript_Jquery - Fatal编程技术网

Javascript Jquery语法等价

Javascript Jquery语法等价,javascript,jquery,Javascript,Jquery,jquery的等价物是什么: document.getElementById("roomType").innerHTML = $('#' + self.selectedLocation + '').html(); $('#roomType').html('#' + self.selectedLocation); 我试过这个: $('#roomType').html('#' + self.selectedLocation); 但我得到的结果是: $('#roomType').ht

jquery的等价物是什么:

document.getElementById("roomType").innerHTML = $('#' + self.selectedLocation + '').html();
  $('#roomType').html('#' + self.selectedLocation);
我试过这个:

  $('#roomType').html('#' + self.selectedLocation);
但我得到的结果是:

  $('#roomType').html('#' + self.selectedLocation);
#6
它将是:

  $('#roomType').html('#' + self.selectedLocation);
$('#roomType').html( $('#' + self.selectedLocation).html() );

只是少了一点东西:

  $('#roomType').html('#' + self.selectedLocation);
$('#roomType').html($('#' + self.selectedLocation).html());
$('#'+self.selectedLocation+'').html()已经是jQuery了!