jquery get 비동기 요청 실현

page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>ajaxtitle>
<script src="/ajax/js/jquery-3.3.1.min.js">script>
head>
<body>
<form action="http://www.ubfgho.com/" method="post" enctype="application/x-www-form-urlencoded">
<input type="text" name="name"><span>span><br>
<input type="password" name="psw"><br>
<input type="submit" value=" "><br>
form>
body>
<script>
//jquery get
/*
* 1url
* 2
* 3--
* 4
* */
$(':text').blur(function () {
var name1=$(this).val().trim()
$.get("/ajax/login?",{"name":name1},function (d) {
$("span").html(d).css("color","red");
},"text");
})

좋은 웹페이지 즐겨찾기