[comment]: # translation:outdated

[comment]: # ({ceca660a-ceca660a})
# 删除

[comment]: # ({/ceca660a-ceca660a})

[comment]: # ({ad3a6f0d-db451e99})
### 描述
`object script.delete(array scriptIds)`

此方法允许删除脚本。

::: 请注意
此方法只有_超级管理员_ 用户可以使用。可以在用户角色设置中撤销调用此方法的权限。更多信息见 [User roles](/manual/web_interface/frontend_sections/administration/user_roles)
:::

[comment]: # ({/ad3a6f0d-db451e99})

[comment]: # ({17e2e442-17e2e442})
###  参数

`(数组)` 要删除的脚本ID。

[comment]: # ({/17e2e442-17e2e442})

[comment]: # ({64908342-64908342})
### 返回值

`(对象)` 返回一个`scriptids`属性包含被删除脚本ID的对象。

[comment]: # ({/64908342-64908342})

[comment]: # ({b41637d2-b41637d2})
### 示例

[comment]: # ({/b41637d2-b41637d2})

[comment]: # ({7b361f53-8184d373})
#### 删除多个脚本
删除两个脚本
[请求](/manual/api#performing-requests):

```json
{
    "jsonrpc": "2.0",
    "method": "script.delete",
    "params": [
        "3",
        "4"
    ],
    "id": 1
}
```

响应
```json
{
    "jsonrpc": "2.0",
    "result": {
        "scriptids": [
            "3",
            "4"
        ]
    },
    "id": 1
}
```

[comment]: # ({/7b361f53-8184d373})

[comment]: # ({ccc98e5e-ccc98e5e})
### 源代码

CScript::delete() 在*frontends/php/include/classes/api/services/CScript.php*。

[comment]: # ({/ccc98e5e-ccc98e5e})
