<ion-view> <div class="bar bar-header bar-dark"> <h1 class="title">Welcome</h1> </div> <ion-content class="has-header"> <form ng-submit="doLogin()"> <div class="list"> <label class="item item-input"> <span class="input-label">手机号</span> <input type="text" ng-model="phonenumber" placeholder="这里输入手机号" maxlength="11"> <button class="button button-dark" style="margin-right: 16px;" ng-click="getVerifyCode(111)">获取验证码</button> </label> <label class="item item-input"> <span class="input-label">验证码</span> <input type="password" ng-model="verifycode"> </label> <label class="item"> <button class="button button-block button-dark" ng-click="getVerifyCode(111)">登 陆</button> </label> </div> </form> </ion-content> </ion-view>
>为什么标签标签内的按钮(获取验证码)不起作用?
>但是标签外的按钮(登陆)工作正常,为什么?
>请帮我解决这个问题.我需要在点击时做出回复
按钮(获取验证码)
working demo
原文链接:https://www.f2er.com/angularjs/141564.htmlHTML
<form ng-submit="doLogin()"> <div class="list"> <div class="item item-input"> <span class="input-label">手机号</span> <input type="text" ng-model="phonenumber" placeholder="这里输入手机号" maxlength="11"> <!-- <input ></input> --> <button class="button button-dark" style="margin-right: 16px;" ng-click="getVerifyCode(111)">获取验证码</button> </div> <label class="item item-input"> <span class="input-label">验证码</span> <input type="password" ng-model="verifycode"> </label> <label class="item"> <button class="button button-block button-dark" ng-click="getVerifyCode(111)">登 陆</button> </label> </div> </form>