Home > Web Front-end > JS Tutorial > jquery's $('#id').html() has no content solution_jquery

jquery's $('#id').html() has no content solution_jquery

WBOY
Release: 2016-05-16 18:25:31
Original
1909 people have browsed it

I added $("#id").html("" result "");
Just add span! ! !
Record it here.

General solution: Pay attention to whether the name of result is repeated with some built-in ones. It is recommended to use content, etc.

When I write this into a function today, I also need to pay attention to:

function doad(datastr,id){ 
//getid(id).innerHTML = datastr;
$("#"+id).html(datastr);
}
Copy after login

When calling:

<div id="logo_m"></div>
<script>
var lom_m="脚本之家 www.jb51.net";
doad(logo_m,'logo_m');
</script>
Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template