HTML5的布局代码如下:
<div id="volume_micphone_slider" style="z-index:1;">
<input id="volume_slider" class="volume_slider" type="vslider" name="p1c" max="100" value="20" buddy="p1c-buddy" />
</div>
<div>
<button id="volume_show" class="volume_show" ></button>
<button id="micphone_show" class="micphone_show"></button>
</div>
绑定的事件代码如下:(采用的是tiscript)
var volume_flag=1;
function volume_ctrl()
{
if(volume_flag)
{
$(#volume_slider).style#display ="none";
volume_flag=0;
}
else
{
$(#volume_slider).style#display ="inline-block";
volume_flag=1;
}
}
$(#volume_show).onClick = function()
{
volume_ctrl();
}
布局的页面如下:
但是点击这个音量的Button仍然没有反应。请问可能是什么问题呢?谢谢
$('#volume_show')
,把字符串的引号去掉真的好么?还有并不知道你用的什么库,会暴露
style#display
这种属性,如果确定属性没错的话多半是选择器的问题