对象中的Javascript对象

Dav*_*vid 2 javascript jquery

我在一个对象中创建一个对象有一些问题,它的语法相关,但似乎无法记住我是如何实现这一点的.

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 =

kar*_*m79 8

使用:从它们各自的价值分开"属性":

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)

一些阅读: