大师,我正在使用 Jquery 根据字段值选项隐藏或显示字段。以前我使用隐藏和显示功能,它工作正常,但有空白。所以我改为使用 jquery display none 来隐藏字段。但是还是不行,求大神指点,谢谢!下面是我的代码。
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(
function(){
hideRating('initial');
}
);
function hideRating(scope){
if(scope=='initial'){
jQuery('[id$=CallSupportBeforeOutput]').style.display = "none";
jQuery('[id$=CallSupportBeforeQuestionLabel]').style.display = "none";
}
}
最佳答案
解决方法如下:
jQuery('#CallSupportBeforeOutput').css("display", "none");
jQuery('#CallSupportBeforeQuestionLabel').css("display", "none");
关于javascript - jquery 显示无不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45830950/