" What does mean?" 的意思是什么?
<p>我正在尝试从一个函数中<code>alert</code>返回的值,并且在弹出框中得到了以下内容:</p>
<pre class="brush:none;toolbar:false;">[object Object]
</pre>
<p>以下是JavaScript代码:</p>
<pre class="brush:html;toolbar:false;"><script type="text/javascript">
$(function ()
{
var $main = $('#main'),
$1 = $('#1'),
$2 = $('#2');
$2.hide(); // 页面加载时隐藏div#2
$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>
</pre>
<p><code>whichIsVisible</code>是我正在尝试检查的函数。</p>