原来JQuery的Id和Class 还可以动态计算:方便多了
$(document).ready(function() {
$(":button").click(function() {
var id=0;
$("div").each(function(index,item){
if($(this).attr("style").indexOf("block") > 0 )
{
$(this).attr("style","display: none");
id=parseInt($(this).attr("id"));
}
else if(id!=0)
{
$("#"+(id+1)).attr("style","display: block");
id=0;
}
});
});
});