本文介绍了javascript for dropdown的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
function DiseaseChange(){
var disease = document.getElementById( <%= DDLDisease.ClientID%>)。selectedindex;
if (确认( 你确定吗?你想改变疾病吗?)== true ){
}
else {
document.getElementById( <%= DDLDisease.ClientID %>)。selectedindex =疾病;
return false ;
}
这是我为下拉列表写的javascript
当我点击取消警报时,疾病下拉的价值不应该改变......但这不是快乐..下拉的价值正在变化..请帮我解决这个问题..
解决方案
function DiseaseChange() { var disease = document.getElementById("<%=DDLDisease.ClientID %>").selectedindex; if (confirm("Are You sure yow want to change disease?") == true) { } else { document.getElementById("<%=DDLDisease.ClientID %>").selectedindex = disease; return false; }
this is the javascript i wrote for dropdownlist
when i am clicking on cancel of the alert the value of disease dropdown should not be change...but this is not happning..value of drop down is getting change..please help me out from this problem..
解决方案
这篇关于javascript for dropdown的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!