物體是什么意思?我試圖從一個(gè)函數(shù)中通知一個(gè)返回的值,并且我在警報(bào)中得到了這個(gè)消息。以下是javascript代碼<script type="text/javascript">$(function (){var $main = $('#main'),
$1 = $('#1'),
$2 = $('#2');$2.hide(); // hide div#2 when the page is loaded$main.click(function (){
$1.toggle();
$2.toggle();});
$('#senddvd').click(function (){
alert('hello');
var a=whichIsVisible();
alert(whichIsVisible());});function whichIsVisible(){
if (!$1.is(':hidden')) return $1;
if (!$2.is(':hidden')) return $2;}
});
</script>它是我想要檢查的功能
物體是什么意思?
溫溫醬
2019-07-17 15:03:33