<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#b01").click(function() {
htmlobj = $.ajax({
url : "/kjmfl",
async : false
});
$("#myDiv").html(htmlobj.responseText);
});
});
</script>
</head>
<body>
<button id="b01" type="button"></button>
</body>

</html>

使用ajax的responseText属性获取后台获得字符串形式的响应数据。



相关文章:

  • 2021-08-04
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2021-10-29
  • 2022-03-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-14
  • 2021-07-10
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2021-11-21
  • 2022-12-23
相关资源
相似解决方案