物體是什么意思?我試圖從一個函數中通知一個返回的值,并且我在警報中得到了這個消息。以下是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>它是我想要檢查的功能
物體是什么意思?
慕絲7291255
2019-07-27 15:15:47