mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-25 16:39:04 -06:00
Co-authored-by: Brian Mann <brian.mann86@gmail.com> Co-authored-by: Zach Bloomquist <git@chary.us> Co-authored-by: Zach Bloomquist <github@chary.us>
32 lines
730 B
HTML
32 lines
730 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title></title>
|
|
<script type="text/javascript" src="static/jquery.js"></script>
|
|
</head>
|
|
<body style="background-color: #ddd;">
|
|
<script type="text/javascript">
|
|
$(function(){
|
|
$("form").submit(function(e){
|
|
var form = $(this)
|
|
|
|
setTimeout(function(){
|
|
$.post("/users", form.serialize()).done(function(data){
|
|
var span = $("<span><strong>form success!</strong></span>")
|
|
span.append(JSON.stringify(data))
|
|
form.append(span)
|
|
})
|
|
}, 500)
|
|
|
|
return false
|
|
})
|
|
})
|
|
</script>
|
|
|
|
<form>
|
|
What is your name?
|
|
<input name="name">
|
|
<button id="submit" type="submit">submit</button>
|
|
</form>
|
|
</body>
|