簡體   English   中英

我的 ng-submit 不起作用我在這段代碼中有什么問題?

[英]my ng-submit is not working what is my problem in this code?

在我的代碼中,我真的不明白為什么我的 ng-submit 不起作用..

<div ng-controller="cn1" class="col-lg-4" style="border:1px solid brown;border-radius:20px;">
  <h3>Input city:</h3><br>
  <form  class="text-center" ng-submit="access()">
       <div class="form-group">
           <input type="text"class="form-control" ng-model="city">
       </div><br>
       <input type="button" value="Get Details" style="text-align:center;margin-right:500;"  
                     class="btn btn-primary justify-content-center">
   </form>
   </div>

將類型從按鈕更改為提交:

<input type="button" value="Get Details" style="text-align:center;margin-right:500;"  
                     class="btn btn-primary justify-content-center">

<input type="submit" value="Get Details" style="text-align:center;margin-right:500;"  
                     class="btn btn-primary justify-content-center">

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM