aa00aa00
aa00aa00
  • 发布:2016-12-29 23:29
  • 更新:2016-12-30 10:37
  • 阅读:2458

mui (checkbox)问题求助

分类:MUI

今天碰到一个问题,大家帮忙看看,先谢谢大家了
具体是这样的:

我使用mui的checkbox(有多个checkbox的情况),这里我的程序在Hbuiler中就可以使用,并且弹出alert.
下面是Hbuiler环境中的程序:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>対応予定</title>
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<!--Scripts-->
<style>
.mui-h6 span {
font-weight: bold;
}
</style>

</head>
<body>
<!--scroll height start-->
<div class="mui-content" style="height: 300px;">
<div id="scrollFc1" class="mui-scroll-wrapper">
<div class="mui-scroll">
<ul class="mui-table-view mui-table-view-striped mui-table-view-condensed">
<li class="mui-table-view-cell mui-active" style="background-color: #FFFFFF;">
<div class="mui-table-cell mui-col-xs-10">
<p class="mui-h6 mui-ellipsis">
<span>対応済:</span>
<input class="lnkScheduleContactFinish" type="checkbox" name="customerId" value="1" />
<input type="hidden" id="contactNo" value="${f:h(cil.contactNo)}" />
</p>

                   </div>  
          </li>  
        </ul>  
    </div>  
  </div>  
</div>  

</body>
</html>
<script src="js/mui.min.js"></script>
<script type="text/javascript">
(function($, doc) {
$.init();
var lnkScheduleContactFinishs = $('.lnkScheduleContactFinish');
lnkScheduleContactFinishs.each(function(i, btn) {
btn.addEventListener('tap', function(event) {
alert("11111");
}, false);
});
})(mui, document);
</script>

如果把这个程序代码放入eclipse中,就不好用了,alert一直弹不出来.

下面是eclipse中的程序代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>対応予定</title>
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<!--Scripts-->
<style>
.mui-h6 span {
font-weight: bold;
}
</style>
</head>
<body>
<!--scroll height start-->
<div class="mui-content" style="height: 300px;">
<div id="scrollFc1" class="mui-scroll-wrapper">
<div class="mui-scroll">
<ul class="mui-table-view mui-table-view-striped mui-table-view-condensed">
<li class="mui-table-view-cell mui-active" style="background-color: #FFFFFF;">
<div class="mui-table-cell mui-col-xs-10">
<p class="mui-h6 mui-ellipsis">
<span>対応済:</span>
<input class="lnkScheduleContactFinish" type="checkbox" name="customerId" value="1" />
<input type="hidden" id="contactNo" value="${f:h(cil.contactNo)}" />
</p>
</div>
</li>
</ul>
</div>
</div>
</div>
</body>
</html>
<!--Scripts-->
<script type="text/javascript" src="${f:url('/js/mui.min.js')}"></script>
<script type="text/javascript">
(function($, doc) {
$.init();
var lnkScheduleContactFinishs = $('.lnkScheduleContactFinish');
lnkScheduleContactFinishs.each(function(i, btn) {
btn.addEventListener('tap', function(event) {
alert("11111");
}, false);
});
})(mui, document);
</script>

这里alert一直就不出来?????
请问这是什么原因呢?大家帮忙看看,谢谢了.

2016-12-29 23:29 负责人:无 分享
已邀请:
aa00aa00

aa00aa00 (作者)

没人知道吗?

aa00aa00

aa00aa00 (作者)

我的问题找到原因了,自己找到的,问个问题都没人说话,呵呵

该问题目前已经被锁定, 无法添加新回复