点IE关闭按钮触发事件

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
<style>
.box{border:1px solid

#C0C0C0;width:182px;height:19px;clip:rect(0px,181px,18px,0px);overflow:hidden;}
.box2{border:1px solid

#F4F4F4;width:180px;height:17px;clip:rect(0px,179px,16px,0px);overflow:hidden;}
select{position:relative;left:-2px;top:-2px;font-size:12px;width:183px;line-height:14px;bo

rder:0px;color:#909993;}
</style>
<script language="javascript">
function test()
{
 alert('OK');
}
</script>
</HEAD>
<BODY οnbefοreunlοad="return test();">
<div class=box>
<div class=box2><select hidefocus>
  <option selected>网站的封面
  <option value=031113>上海夏天(一一友情提供)
  <option value=031106>上海夏天(一)
  <option value=030916>上海夏天出版了
  <option value=031018>在雨中(二)
  <option value=030915>开往黎明的地铁(二)
  <option value=030913>开往黎明的地铁
  <option value=031029>亲爱的你们在干什么
  <option value=000000>更多封面……</select></div></div>
</body>

</html> 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
帮我完善下面这串代码#include <msp430.h> unsigned int seconds = 0; // 记录秒数 unsigned int minutes = 0; // 记录分钟数 unsigned int home_score = 0; // 主队得分 unsigned int guest_score = 0; // 客队得分 void main(void){ WDTCTL = WDTPW + WDTHOLD; // 关闭看门狗定时器 // 配置定时器A TA0CTL = TASSEL_2 + MC_1 + ID_3; // 选择SMCLK作为时钟源,以1:8的分频计数模式 TA0CCR0 = 62500; // 定时器计数到62500时产生中断,即1秒钟 TA0CCTL0 = CCIE; // 允许定时器A中断 // 配置按键中断 P1DIR &= ~(BIT1 + BIT2); // P1.1和P1.2作为输入 P1REN |= BIT1 + BIT2; // P1.1和P1.2启用上拉电阻 P1OUT |= BIT1 + BIT2; // P1.1和P1.2上拉 P1IE |= BIT1 + BIT2; // P1.1和P1.2开启中断 P1IES |= BIT1 + BIT2; // P1.1和P1.2设置为下降沿触发 P1IFG &= ~(BIT1 + BIT2); // 清除P1.1和P1.2的中断标志位 // 配置LED灯 P4DIR |= BIT7; // P4.7作为输出 __enable_interrupt(); // 开启全局中断 while(1) { // 显示计时器和得分 P4OUT |= BIT7; // 亮LED灯 __delay_cycles(500000); // 延时0.5秒 P4OUT &= ~BIT7; // 熄灭LED灯 __delay_cycles(500000); // 延时0.5秒 } } #pragma vector=TIMER0_A0_VECTOR // 定时器A中断服务程序 __interrupt void Timer_A(void){ seconds++; // 秒数加1 if(seconds == 60) // 一分钟过去了 { seconds = 0; // 秒数清零 minutes++; // 分钟数加1 } if(minutes == 45) // 比赛结束 { TA0CTL = MC_0; // 停止定时器A } } #pragma vector=PORT1_VECTOR // 按键中断服务程序 __interrupt void Port_1(void){ if(P1IFG & BIT1) // P1.1的中断标志位被触发了 { home_score++; // 主队加分 } else if(P1IFG & BIT2) // P1.2的中断标志位被触发了 { guest_score++; // 客队加分 } P1IFG &= ~(BIT1 + BIT2); // 清除P1.1和P1.2的中断标志位} }
最新发布
06-06

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值