Javascript-DOM EventListener 事件添加句柄

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>4. Javascript-DOM EventListener 事件添加句柄</title>
</head>
<body>
<button id="btn">按钮</button>
<script>
var x=document.getElementById("btn");
x.addEventListener("click",hello);
x.addEventListener("click",world);
function hello(){
    alert("hello");
}
function world(){
    alert("world");
}
</script>
</body>
</html>
阅读 116

Comments

p

ps4 games 2小时前

Hi it's me, I am also visiting this website regularly, this site is genuinely fastidious and the viewers are genuinely sharing fastidious thoughts.

回复此评论

p

ps4 games 7小时前

Hello there, just became aware of your blog through Google, and found that it is truly informative. I am gonna watch out for brussels. I will be grateful if you continue this in future. Numerous people will be benefited from your writing. Cheers!

回复此评论

p

ps4 games 1天前

Keep on writing, great job!

回复此评论

p

ps4 games 2天前

I am regular visitor, how are you everybody? This piece of writing posted at this website is truly good.

回复此评论

p

ps4 games 3天前

Thank you a bunch for sharing this with all of us you actually know what you are talking about! Bookmarked. Kindly also seek advice from my web site =). We can have a hyperlink change contract among us

回复此评论

q

quest bars cheap 4天前

Good day! I know this is kinda off topic however I'd figured I'd ask. Would you be interested in exchanging links or maybe guest writing a blog article or vice-versa? My site addresses a lot of the same subjects as yours and I feel we could greatly benefit from each other. If you're interested feel free to shoot me an e-mail. I look forward to hearing from you! Awesome blog by the way!

回复此评论

q

quest bars cheap 5天前

Thankfulness to my father who stated to me concerning this website, this weblog is genuinely awesome.

回复此评论

q

quest bars cheap 6天前

Great info. Lucky me I discovered your blog by chance (stumbleupon). I have bookmarked it for later!

回复此评论

p

ps4 games 1周前

Hey There. I found your blog the use of msn. That is an extremely smartly written article. I will make sure to bookmark it and return to learn more of your helpful information. Thank you for the post. I'll definitely comeback.

回复此评论

p

ps4 games 1周前

I'm gone to inform my little brother, that he should also pay a visit this web site on regular basis to take updated from latest news.

回复此评论

p

ps4 games 1周前

Great article, totally what I wanted to find.

回复此评论

q

quest bars cheap 1周前

You're so cool! I don't suppose I have read a single thing like this before. So good to find somebody with some unique thoughts on this topic. Seriously.. thank you for starting this up. This website is something that's needed on the internet, someone with a bit of originality!

回复此评论

q

quest bars cheap coupon twitter 1周前

Its like you read my mind! You seem to know so much about this, like you wrote the book in it or something. I think that you could do with some pics to drive the message home a bit, but other than that, this is magnificent blog. A great read. I'll certainly be back.

回复此评论

q

quest bars cheap coupon twitter 1周前

I feel this is one of the most important info for me. And i am happy studying your article. However should commentary on some general things, The web site taste is ideal, the articles is really great : D. Excellent job, cheers

回复此评论

q

quest bars cheap 1周前

Hi there to all, how is everything, I think every one is getting more from this site, and your views are pleasant in favor of new visitors.

回复此评论

q

quest bars cheap 1周前

Why people still use to read news papers when in this technological globe the whole thing is available on web?

回复此评论

p

ps4 games 2周前

I have read so many articles about the blogger lovers except this piece of writing is in fact a fastidious piece of writing, keep it up.

回复此评论

p

ps4 games 2周前

I don't know whether it's just me or if everyone else encountering issues with your blog. It looks like some of the written text in your content are running off the screen. Can someone else please comment and let me know if this is happening to them as well? This may be a issue with my internet browser because I've had this happen previously. Appreciate it

回复此评论

p

ps4 games 2周前

If some one wishes expert view regarding blogging and site-building after that i recommend him/her to go to see this blog, Keep up the pleasant job.

回复此评论

t

tinyurl.com 2周前

Incredible story there. What occurred after? Thanks!

回复此评论