Skip to content

Commit

Permalink
添加演示代码文件
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasy Dong authored and Jasy Dong committed Sep 17, 2016
0 parents commit d65bafe
Show file tree
Hide file tree
Showing 4 changed files with 10,119 additions and 0 deletions.
39 changes: 39 additions & 0 deletions demo01.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JS代码调试-控制台</title>
</head>
<body>
<div class="content"></div>
<script src='js/jquery-3.1.0.min.js'></script>
<script>

$(function(){

function test01(len) {
for (var i=0; i<len; i++) {
$('.content').append('<div>text '+i+'</div>');
}
}

function test02(len) {
var html = '';
for (var i=0; i<len; i++) {
html += '<div>text '+i+'</div>';
}
$('.content').append(html);
}

var start = new Date().getTime();

test01(5000);

var end = new Date().getTime();

console.log('time used:'+(end-start)+'ms');
});

</script>
</body>
</html>
Loading

0 comments on commit d65bafe

Please sign in to comment.