relationShipCol.html("<select name=relation*"+rowNo+" " +
"onchange=open_new_window("+rowNo+",this)" +
" id=relation"+rowNo+" class='realtionEstablishStyle'>" +
"<option value=NO >NO</option><option value=YES selected>YES</option></select>");
我的功能如下....适用于所有浏览器。但不适用于IE。我已经在ie8和ie10
进行了测试function open_new_window(x,val){
myRef=val;
//Ie shows error in below line char4...it says object doesn't support this property //or method
var checkFlag=$(myRef).attr('name').contains("child");
var hiddeRelationEleArray=$(':hidden.relationHiddenCls');
var refColRelationsArray=new Array();
$(hiddeRelationEleArray).each(function(ind,ele){
var getVal=$(ele).val();
if(getVal!=null&&getVal!=""&&getVal!=undefined){
//alert('getVal:'+getVal);
refColRelationsArray.push(getVal);
}
});
if(val.value=="YES")
{
if(checkFlag){
window.open('childRelationShip.jsp?colNo='+x+'&relations='+refColRelationsArray);
}else{
window.open('relationship.jsp?colNo='+x+'&relations='+refColRelationsArray);
}
}
任何其他选项。请提前帮助谢谢..
这行代码不起作用 var checkFlag = $(myRef).attr('name')。contains(“child”);