嗨; 当用户点击单选按钮时,我想要做的是,如果 javascript在他们的浏览器上启用,那么调用javascript函数和 不进行回发。如果javascript被禁用,那么它确实会进行回发。 有没有办法做到这一点? - 谢谢 - 戴夫 david_at_windward_dot_net http:// www.windwardreports
解决方案David Thielen说: 嗨; 当用户点击一个单选按钮时,我想要做的是,如果在他们的浏览器上启用了javascript,它会调用一个javascript函数,而不会做一个回发。如果javascript被禁用,那么它确实会进行回发。 有没有办法做到这一点?
嗯,你可以抓住表单的OnSubmit事件并处理它 有客户端代码...返回true或false允许或 禁止浏览器发布。 FWIW, Greg G.
使用Request.Browser.JavaScript检测是否启用了javascript在你之前 输出实际的页面,连同radiobutton并改变你的输出 如果不是这样就不能调用javascript函数。 - 问候 John Timney Microsoft MVP David Thielen <第***** @ nospam.nospam>在消息中写道 news:60 ********************************** @ microsof t ... 嗨; 当用户点击一个单选按钮时,我想要做的是,如果 javascript已启用浏览器,它调用javascript函数和不做回发。如果javascript被禁用,那么它确实会进行回复。 有没有办法做到这一点? - 谢谢 - 戴夫 david_at_windward_dot_net www.windwardreports
嗨; 我可能遗漏了一些东西。如果javascript被禁用,那么onsubmit 函数不会被调用 - 对吗? - 谢谢 - dave david_at_windward_dot_net www.windwardreports " GregG"写道: David Thielen说: 嗨; 当用户点击一个单选按钮时,我是什么我想做的是,如果在他们的浏览器上启用了javascript,它会调用javascript函数并且不会进行回发。如果javascript被禁用,那么它确实会进行回发。 有没有办法做到这一点?
那么,你可以捕获OnSubmit事件使用客户端代码表单和处理 ...返回true或false以允许或不允许浏览器发布。 FWIW, Greg G。
Hi; When a user clicks a radio button, what I would like to do is that if javascript is enabled on their browser, it calls a javascript function and does not do a postback. If javascript is disabled, then it does do a postback. Is there a way to do this? -- thanks - dave david_at_windward_dot_net www.windwardreports
解决方案 David Thielen said: Hi;When a user clicks a radio button, what I would like to do is that ifjavascript is enabled on their browser, it calls a javascript function anddoes not do a postback. If javascript is disabled, then it does do a postback.Is there a way to do this?Well, you could capture the OnSubmit event for the form and handle it there with client side code... return true or false to allow or disallow the browser to post. FWIW, Greg G.
Detect if javascript is enabled using Request.Browser.JavaScript before you output the actual page contianing the radiobutton and change your output accordingly if its not so the javascript function cannot be called. -- Regards John Timney Microsoft MVP "David Thielen" <th*****@nospam.nospam> wrote in message news:60**********************************@microsof t... Hi; When a user clicks a radio button, what I would like to do is that if javascript is enabled on their browser, it calls a javascript function and does not do a postback. If javascript is disabled, then it does do a postback. Is there a way to do this? -- thanks - dave david_at_windward_dot_net www.windwardreportsHi; I may be missing something. If javascript is disabled, then the onsubmit function won''t be called - correct? -- thanks - dave david_at_windward_dot_net www.windwardreports "GregG" wrote: David Thielen said:Hi;When a user clicks a radio button, what I would like to do is that ifjavascript is enabled on their browser, it calls a javascript function anddoes not do a postback. If javascript is disabled, then it does do a postback.Is there a way to do this?Well, you could capture the OnSubmit event for the form and handle it there with client side code... return true or false to allow or disallow the browser to post. FWIW, Greg G.
更多推荐
函数如果启用了javascript,则返回
发布评论