我有一個條件下,我有一個下拉選項,其上有5個選項。 任何選項的點擊,「fancybox」模式窗口打開。但我不想 想打開fancybox時點擊「選項1」。根據 條件,我不能放置「選項1的值屬性」。其他全部 有價值屬性。不要打開fancybox點擊一個特定的下拉選項
function openFB(focusAeraData, idData) {
var userIdData = $("#userIdData").val();
var focusAreaSelectBoxValue01 = $("#focusAera1").val();
var focusAreaSelectBoxValue02 = $("#focusAeraFirst").val();
var focusAreaSelectBoxValue03 = $("#focusAeraSecond").val();
if ((focusAreaSelectBoxValue01 == focusAreaSelectBoxValue02 || focusAreaSelectBoxValue02 == focusAreaSelectBoxValue03)
&& idData == 2) {
$("#focusAeraError2").html('Please Select different Focus');
$("#focusAeraFirst").val('');
$("#focusAreaContent2").html('');
$('#foucusAreaLaunchURL2').html("");
$('#focusAeraFirst>option:eq(0)').prop('selected', true);
$("#focusAeraError3").html('');
$("#focusAeraError1").html('');
} else if ((focusAreaSelectBoxValue01 == focusAreaSelectBoxValue03 || focusAreaSelectBoxValue02 == focusAreaSelectBoxValue03)
&& idData == 3) {
$("#focusAeraError3").html('Please Select different Focus');
$("#focusAeraSecond").val('');
$('#focusAeraSecond>option:eq(0)').prop('selected', true);
$("#focusAeraError2").html('');
$('#foucusAreaLaunchURL3').html("");
$("#focusAreaContent3").html('');
$("#focusAeraError1").html('');
}
else {
$("#focusAeraError" + idData).html('');
getValueDataRemove(idData);
var OpenPOPUPURL = '../../pop_up/get_popup_scorecard?idData='
+ idData + '&focusAeraData=' + focusAeraData + '&userId='
+ userIdData;
$.fancybox({
autoSize : true,
'maxWidth' : '35%',
'minWidth' : '35%',
'width' : '680',
modal : false,
fitToView : true,
'padding-bottom' : '5px',
arrows : false,
openEffect : 'fade',
openSpeed : 'slow',
closeEffect : 'fade',
closeSpeed : 'slow',
closeBtn : false,
href : OpenPOPUPURL, //Your form must have an action.
type : 'ajax',
'helpers' : {
'overlay' : {
'closeClick': false,
}
},
ajax : {
type : "GET",
cache : false,
data : $(this).serializeArray(),
},
scrolling : 'no',
iframe : {
scrolling : 'auto',
preload : true
}
})
}
}
你能發佈生成的html嗎? – Sagar