wes*_*bos 10 javascript jquery count
看起来很简单,但我无法让它工作.
我有两个div'类'用户'.我想输出"你有2个div".
<script type="text/javascript">
$(document).ready(function() {
function divcount() {
var mycount = $('.user').length();
document.write(mycount)
}
});
</script>
Run Code Online (Sandbox Code Playgroud)
我确定我错过了一些简单的东西..