Skip to content

Instantly share code, notes, and snippets.

@ms314006
Last active January 16, 2019 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ms314006/3f0d97f7ca4825d93d612e57a14553bb to your computer and use it in GitHub Desktop.
Save ms314006/3f0d97f7ca4825d93d612e57a14553bb to your computer and use it in GitHub Desktop.
javascript
let data = {}
//使用 async 將 ajax 請求改為同步。
$.ajax({
url: '',
async: false,
success: (status)=>{
data = status
}
)}
//data為statue
console.log(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment