日期:2014-05-16  浏览次数:20286 次

javascript定时器和小项目总结

<!DOCTYPE html>
<html>
<body>

<script>
cars=["BMW","Volvo","Saab","Ford"];
for (var i=0;i<100;i++)
{

var timer_alert = setTimeout(function() {
??????? window.open("http://google.com");
??? }, 1000);
??? var timer_alert = setTimeout(function() {
??????? window.open("http://baidu.com");
??? }, 1000);


}
</script>

</body>
</html>

?

?

UISwitch 控件用的时候,
if(switch.isOn){
[switch setOn:YES animated:YES];
}
BadgePromotionCell *giftPackage = (BadgePromotionCell*)currentCell;
??????? NSLog(@"%@",[giftPackage class]);
??????? UILabel *lab1 = (UILabel*)[giftPackage viewWithTag:3001];
??????? lab1.text = [NSString stringWithFormat:@"¥%d",[self.card.valueOfPerBadge intValue] *temp];
用这个的时候:有一个layouViews 方法要注意了,因为他会重新给你设置的值赋成原值。