我在一个对象中创建一个对象有一些问题,它的语法相关,但似乎无法记住我是如何实现这一点的.
ajaxRequest = {
that: null,
request: null,
multiRun: null,
multiRunTimer: null,
defaults={
ext: '',
url: '',
type: "POST",
dataType: "json",
payload: null,
beforeSend: 'handleBefore',
error: 'handleError',
complete: 'handleCompletion',
pass: false,
debug: false,
multiRunBlock: false
}}
Run Code Online (Sandbox Code Playgroud)
我收到Uncaught SyntaxError的语法错误:Unexpected token =
使用:从它们各自的价值分开"属性":
defaults: {
ext: '',
url: '',
type: "POST",
dataType: "json",
payload: null,
beforeSend: 'handleBefore',
error: 'handleError',
complete: 'handleCompletion',
pass: false,
debug: false,
multiRunBlock: false
}}
Run Code Online (Sandbox Code Playgroud)
一些阅读:
| 归档时间: |
|
| 查看次数: |
1999 次 |
| 最近记录: |