新手。我做菜单导航时默认导航下的列表能出来,可点击其他菜单导航时,效果不出来,还包Uncaught TypeError: Cannot read property 'querySelector' of null错误,求大神指点
代码如下:
<div class="mui-off-canvas-wrap mui-draggable">
<header class="mui-bar mui-bar-nav">
<a class="mui-icon mui-icon-left-nav mui-pull-left"></a>
<a href="#offCanvas" class="mui-icon mui-icon-bars mui-pull-right"></a>
<h1 class="mui-title">我审批的</h1>
</header>
<div style="height:50px;"></div>
<div>
<div id="segmentedControl" class="mui-segmented-control">
<a class="mui-control-item mui-active" id="daichuli" href="#item1mobile">
待处理
</a>
<a class="mui-control-item" id="yichuli" href="#item2mobile">
已处理
</a>
<a class="mui-control-item" id="yichexiao" href="#item3mobile">
已撤销
</a></div>
<div class="mui-content-padded">
<div class="mui-input-row mui-search">
<span class="mui-icon mui-icon-search mui-pull-right"></span>
<input type="search" class="mui-input-clear" placeholder="搜索" style="color: whitesmoke;" value="请输入关键字。。。。">
</div>
</div>
</div>
<div class="mui-content-padded">
<div id="item1mobile" class="mui-control-content mui-active" >
<ul class="mui-table-view">
<li class="mui-table-view-cell">
<a href="//ask.dcloud.net.cn/index-2-dels.html">第一个选项卡子项-1</a>
</li>
<li class="mui-table-view-cell">
<a href="//ask.dcloud.net.cn/index-2-dels.html">第一个选项卡子项-2</a>
</li>
</ul>
</div>
<div id="item2mobile" class="mui-control-content" >
<ul class="mui-table-view">
<li class="mui-table-view-cell">
<a href="//ask.dcloud.net.cn/index-2-dels.html">第二个选项卡子项-1</a>
</li>
<li class="mui-table-view-cell">
<a href="//ask.dcloud.net.cn/index-2-dels.html">第二个选项卡子项-2</a>
</li>
</ul>
</div>
<div id="item3mobile" class="mui-control-content" >
<ul class="mui-table-view">
<li class="mui-table-view-cell">
<a href="//ask.dcloud.net.cn/index-2-dels.html">第三个选项卡子项-1</a>
</li>
<li class="mui-table-view-cell">
<a href="//ask.dcloud.net.cn/index-2-dels.html">第三个选项卡子项-2</a>
</ul>
</div>
</div>
</div>
1 个回复
unionw - 忙的天昏地暗
没有js,根本看不出问题,从你的错误提示来看,可能你的引用有问题