jq 修改swal的标题_js-jquery-SweetAlert2【二】配置与方法

一、配置

ArgumentDefault valueDescription

title

null

模态对话框的标题。它可以在参数对象的title参数中设置,也可以在swal()方法的第一个参数设置。

The title of the modal, as HTML. It can either be added to the object under the key "title" or passed as the first parameter of the function.

titleText

null

模态对话框的内容。

The title of the modal, as text. Useful to avoid HTML injection.

text

null

模态对话框的内容。它可以在参数对象的text参数中设置,也可以在swal()方法的第二个参数设置。

A description for the modal. It can either be added to the object under the key "text" or passed as the second parameter of the function.

html

null

对话框中的内容作为HTML标签。如果同时提供text和html参数,插件将会优先使用text参数。

A HTML description for the modal. If "text" and "html" parameters are provided in the same time, "text" will be used.

type

null

对话框的情景类型。有5种内置的情景类型:warning,error,success,info和question。它可以在参数对象的type参数中设置,也可以在swal()方法的第三个参数设置。

The type of the modal. SweetAlert2 comes with 5 built-in types which will show a corresponding icon animation: warning, error, success, info and question. It can either be put in the array under the key "type" or passed as the third parameter of the function.

target

'body'

The container element for adding modal into.

input

null

表单input域的类型,可以是text, email, password,number, tel, range, textarea, select, radio,checkbox, file and url.

Input field type, can be text, email, password,number, tel, range, textarea, select, radio,checkbox, file and url.

width

'500px'

Modal window width, including paddings (box-sizing: border-box). Can be in px or %.

padding

20

Modal window padding.

background

'#fff'

Modal window background (CSS background property).

customClass

null

模态对话框的自定义class类。

A custom CSS class for the modal.

timer

null

Auto close timer of the modal. Set in ms (milli

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值