组合框代码在IE中完美地工作,但它在FireFox中不起作用 [英] Combo box code is Working in IE perfectly but it is not working in FireFox

查看:48
本文介绍了组合框代码在IE中完美地工作,但它在FireFox中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

组合框脚本代码在IE中完美地与所有模式一起工作但是OnChange事件在FireFox中无法工作(可编辑模式,如果我们选择值组合框值r不放弃,如果输入正确插入的数据)javascript代码如下


请帮我解决这个问题


Hi all,
combo box script code was working in IE perfectly with all modes but OnChange event was not working in FireFox(editable mode, if we select valuese that combo box values r not dislaying if enter the data the it is inserting properly) javascript code follows

pls help me to solve this problem


展开 < span class =codeDivider> | 选择 | Wrap | Line数字

推荐答案

大家好,

这是sivakumar,我使用javascript函数显示val但它在IE中运行良好,但该功能在Firefox中不起作用请帮助我解决上述情况。代码如下:


函数displayComboValues(comboName,comboValue){

if(document.formmain(comboName).type =='' select-one''){

var optn = document.createElement(" OPTION&qu​​ot;);

optn.text = comboValue;

optn.value = comboValue;

document.formmain(comboName).options.add(optn);

document.formmain(comboName).options [document.formmain(comboName) ).length-1] .selected = true;

} else {

document.formmain(comboName).value = comboValue;

}

}


请帮助我克服这种情况
hi all,
this is sivakumar, i am using javascript function for displaying the values but it is working well in IE fine but that function was not working in Firefox Please help me to solve the above situvation . code follows as below


function displayComboValues(comboName,comboValue){
if(document.formmain(comboName).type==''select-one''){
var optn = document.createElement("OPTION");
optn.text = comboValue;
optn.value = comboValue;
document.formmain(comboName).options.add(optn);
document.formmain(comboName).options[document.formmain(comboName).length-1].selected=true;
}else{
document.formmain(comboName).value=comboValue;
}
}

pls help me to overcome this situvation


我还要看表格


大家好,

i我正在使用javascript函数在编辑模式下显示值。它在IE中运行良好,但在Firefox中不起作用请帮我在IE和Firefox中显示值。


我的代码如下


Hi all,
i am using javascript function for displaying the values in the edit mode. it was working fine in the IE but not working in the Firefox pls help me to display the values in the both IE and Firefox .

my code follws


展开 | 选择 | Wrap | 行号


这篇关于组合框代码在IE中完美地工作,但它在FireFox中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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