代码:
复制代码 代码示例:
<!doctype html>
<html>
<body>
<script>
//js定时器代码
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 方法,会重新将设置的值赋成原值。