Redian新闻
>
AJAX or javascript forum recommendation?
avatar
AJAX or javascript forum recommendation?# Java - 爪哇娇娃
g*y
1
Anyone has good AJAX or javascript forum to recommend?
I just tried jGuru, horrible interface.
Anyone can explain following problem is also appreciated -->
1.
2. document.getElementById("MyButton").onclick = highlight;
In my view, Method-1 and Method-2 are interchangeable. However, browser
doesn't think so -->
function highlight() {
alert(this.id);
}
Method-1 set this to window; and Method-2 set this to MyButton. Why is that?
I thin
avatar
g*y
2
That's true. But I'd really like to associate that funciton to HTML element,
just to satisfy my purity on OO style :)
avatar
f*4
3
To achieve your goal, you've to do this in Method-1:

function highlight(obj) {
alert(obj.id);
}
avatar
g*y
4
Never mind my second question, find the answer in AJAX in action.
A simple javascript code could hide so many default information, that's
really bad, and sad for programmer.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。