提交后如何刷新页面部分?

时间:2018-04-25 16:04:29

标签: html angularjs ajax

我为创建用户开发函数,当我创建用户所有页面刷新时,但我想只是表格自动刷新,只是表刷新而不是所有页面,如何纠正我的问题?

function JSalert() {
  swal({
    title: "opération effectuée avec succès",
    text: "",
    icon: "success",
    confirmButtonColor: "#C13232"
  });
  $(document).ready(function() {
    $("button").click(function() {
      location.reload(true);
    });
  });
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="modal-body" ng-style="{'height': '500px','width':'643px'}">
  <form name="myForm1" id="myForm">
    <div class="form-group">
      <label name="refe" class="col-form-label">Email:</label><span style="color: red;">*</span>
      <input type="text" class="form-control" name="refee" ng-model="registration.Email" required>
    </div>
    <div class="form-group">
      <label id="tire7" class="col-form-label">Adress:</label><span style="color: red">*</span>
      <input type="text" class="form-control" name="titree" ng-model="registration.Adress" required>
    </div>
    <div class="form-group">
      <label id="tire75" class="col-form-label">Mobile:</label><span style="color: red">*</span>
      <input type="text" class="form-control" name="titree" ng-model="registration.Mobile" required>
    </div>
    <div class="form-group">
      <label id="site" class="col-form-label">Site:</label><span style="color: red">*</span>
      <input type="text" class="form-control" name="titre12" ng-model="registration.Site" required>
    </div>
  </form>
</div>

<button type="button" class="btn btn-primary" id="btnsave" data-dismiss="modal" onclick="JSalert()" ng-click="signUp()" style="margin-left: 350px" disabled>Done
                    </button>

1 个答案:

答案 0 :(得分:0)

如果仅刷新特定表而不重新加载页面,请在成功注册后再次调用服务(对于您在表中显示的数据)。