扫码关注官方订阅号
css:function(arguments){ //对参数做处理 }
问题已解决:{'background':'red'}就是一个object
闭关修行中......
@LingYanhttp://api.jquery.com/css/#css-properties
.css(properties) properties Type: PlainObject An object of property-value pairs to set.
{} 不就是一个object ?你到底要问什么?
http://api.jquery.com/css/#css-properties
符合,这里()里面参数有两种形式,一种是以json数组加入多个参数,就是你这样的;另一种是以逗号隔开但只能放入一个参数和对应的值,如css('background','red')
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
@LingYan
http://api.jquery.com/css/#css-properties
{} 不就是一个object ?你到底要问什么?
http://api.jquery.com/css/#css-properties
符合,这里()里面参数有两种形式,一种是以json数组加入多个参数,就是你这样的;另一种是以逗号隔开但只能放入一个参数和对应的值,如css('background','red')