Side navigation
Ticket #4040: test.html
File test.html, 0.9 KB (added by colorwind.zhf, February 05, 2009 05:40AM UTC)
test file
<html>
<head>
<script src="http://jqueryjs.googlecode.com/files/jquery-1.3.1.min.js"></script>
</head>
<body>
<div id="mm">
<div class="cs1" name="node1">cs1 node1</div>
<div class="cs1" name="node1">cs1 node1</div>
<div class="cs1">cs1</div>
<div class="cs1">cs1</div>
<div class="cs1">cs1</div>
</div>
<script>
var code = [
'$(".cs1")',
'$(".cs1[name=\'node1\']")',
'$(".cs1[name=\'node1\']",document)',
'$(".cs1[name=\'node1\']",document.body)',
'$(".cs1[name!=\'node1\']")',
'$(".cs1[name^=\'node1\']")'
];
var str = '<br/><br/>/******* write *******/<br/>';
$.each(code,function(i,val){
val += '.length';
str += val+'='+eval(val)+'<br/>';
});
str += '<br/>';
$.each($.browser,function(i,val){
str += i+'='+val+'<br/>';
});
$(document.body).append(str);
</script>
</body>
</html>
Download in other formats:
Original Format
File test.html, 0.9 KB (added by colorwind.zhf, February 05, 2009 05:40AM UTC)
test file
<html>
<head>
<script src="http://jqueryjs.googlecode.com/files/jquery-1.3.1.min.js"></script>
</head>
<body>
<div id="mm">
<div class="cs1" name="node1">cs1 node1</div>
<div class="cs1" name="node1">cs1 node1</div>
<div class="cs1">cs1</div>
<div class="cs1">cs1</div>
<div class="cs1">cs1</div>
</div>
<script>
var code = [
'$(".cs1")',
'$(".cs1[name=\'node1\']")',
'$(".cs1[name=\'node1\']",document)',
'$(".cs1[name=\'node1\']",document.body)',
'$(".cs1[name!=\'node1\']")',
'$(".cs1[name^=\'node1\']")'
];
var str = '<br/><br/>/******* write *******/<br/>';
$.each(code,function(i,val){
val += '.length';
str += val+'='+eval(val)+'<br/>';
});
str += '<br/>';
$.each($.browser,function(i,val){
str += i+'='+val+'<br/>';
});
$(document.body).append(str);
</script>
</body>
</html>