函数如果启用了javascript,则返回

编程入门 行业动态 更新时间:2024-10-23 02:02:49
本文介绍了函数如果启用了javascript,则返回的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

嗨; 当用户点击单选按钮时,我想要做的是,如果 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.windwardreports

Hi; 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,则返回

本文发布于:2023-11-01 01:26:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1547845.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:函数   javascript

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!