如何防止下拉菜单的自动重定向? [英] How to prevent auto redirect of drop down menu?

查看:109
本文介绍了如何防止下拉菜单的自动重定向?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi..guys!我有一个带有javascript null验证的下拉菜单。但是,选择选项后,它会立即自动重定向而不是单击提交按钮。是否有可能阻止这种快速响应?

展开 | 选择 | Wrap | 行号

解决方案

GoToNextPage()将它发送到下一页,所以只是摆脱它onchange。


我无法删除它,因为需要在下一页显示票号。

[PHP]<?=

_GET [ selected_no_ticket]; ?> [/ PHP]


我打算做的是捕获所选的值并在下一页显示。在表单中,我有单选按钮和下拉菜单,适用onclick和onchange属性分别在一个函数中。

展开 | 选择 | Wrap | 行号


Hi..guys!I have a drop down menu with javascript null validation.However,instead of clicking submit button,it will immediately auto redirect after option was selected.Is it possible to prevent this kind of fast respond?

Expand|Select|Wrap|Line Numbers

解决方案

GoToNextPage() is sending it to the next page, so just get rid of the onchange.


I can''t remove it because need to display the number of ticket in next page.
[PHP]<?=


_GET[''selected_no_ticket'']; ?>[/PHP]

What I intend to do is capturing the selected value and display it in next page.In the form I have radio button and drop down menu which apply onclick and onchange attribute respectively in a single function.

Expand|Select|Wrap|Line Numbers


这篇关于如何防止下拉菜单的自动重定向?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆