下拉列表中的Onchange事件 [英] Onchange Event in Dropdown

查看:80
本文介绍了下拉列表中的Onchange事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,

我有OnChange活动的问题,请帮我编写以下要求。

我有一个下拉框有3个项目:印度,美国,南非。如果我选择印度(仅限印度),弹出窗口应该会出现一些文字/问题(你是印度公民吗?),是/否应该是唯一的选择。如果用户单击是,则应将某个值保存在变量中,我需要将其保存在我的数据库中,以便保留记录,询问问题并回答。


请帮帮我。谢谢inadvance。


问候,

Hi Friends,
I have a problem with OnChange event, Please help me out in coding the below requirement.
I have a drop down box with 3 items: India,United States,South Africa. If I select India(for India alone) a pop up window should come up with some text/question("Are you an Indian Citizen?"), Yes/No should be the only options. If the user clicks on Yes, some value should be saved in a variable which i need to save it in my database so as to maintain a record that a question was asked and answered.

Please help me out. Thanks inadvance.

Regards,

推荐答案

你可以使用 window.confirm()


感谢您的回复。

如果用户单击OK,我想在变量中存储一些值并在文本框中调用它。如何实现这一点?
Thanks for the reply.
if the user clicks OK, i want to store some value in a variable and call it in a text box.. How can achieve this?


展开 | 选择 | < span class =codeLinkonclick =WordWrap(this);> Wrap | 行号


这篇关于下拉列表中的Onchange事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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