avatar
javascript question# Java - 爪哇娇娃
m*r
1
hi,
i need a checkbox, when checked, the page looks one way, when unchecked, the
page looks another way.
any sample code for this kind of thing?
3x
avatar
c*g
2
google: javascript checkbox onclick

【在 m****r 的大作中提到】
: hi,
: i need a checkbox, when checked, the page looks one way, when unchecked, the
: page looks another way.
: any sample code for this kind of thing?
: 3x

avatar
c*y
3
For example, if you want to display an alert window when a checkbox is
checked,


【在 m****r 的大作中提到】
: hi,
: i need a checkbox, when checked, the page looks one way, when unchecked, the
: page looks another way.
: any sample code for this kind of thing?
: 3x

avatar
w*t
4
well, not exact - but, is there a way at server side to check if client
browser has javascript enabled/disabled - such as check it in jsp etc
thanks
avatar
o*e
5
not impossible, but it's normally checked on client side.

【在 w******t 的大作中提到】
: well, not exact - but, is there a way at server side to check if client
: browser has javascript enabled/disabled - such as check it in jsp etc
: thanks

avatar
g*s
6
得第二次REQUEST才能知道吧?放个HIDDEN变量用JAVASCRIPT改,再REQUEST应该
就可以知道了,用AUTO-REFRESH可以让用户觉得就一次REQUEST.

【在 w******t 的大作中提到】
: well, not exact - but, is there a way at server side to check if client
: browser has javascript enabled/disabled - such as check it in jsp etc
: thanks

avatar
m*t
7
Hmm, I didn't think it through so take my words with some salt - you
can probably do it in the first request. Just have a piece of javascript
setting an image url. If this image url is requested, the javascript
worked, otherwise not.
That said, I don't see much the server side can do with the first
request even after it has determined the client javascript availability.

【在 g*s 的大作中提到】
: 得第二次REQUEST才能知道吧?放个HIDDEN变量用JAVASCRIPT改,再REQUEST应该
: 就可以知道了,用AUTO-REFRESH可以让用户觉得就一次REQUEST.

avatar
o*e
8
that image is a second request.

【在 m******t 的大作中提到】
: Hmm, I didn't think it through so take my words with some salt - you
: can probably do it in the first request. Just have a piece of javascript
: setting an image url. If this image url is requested, the javascript
: worked, otherwise not.
: That said, I don't see much the server side can do with the first
: request even after it has determined the client javascript availability.

avatar
m*t
9

Yes, but you don't need to refresh the whole page. That's what counts -
from a user experience standpoint, at least.

【在 o***e 的大作中提到】
: that image is a second request.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。