开发者

jQuery if not exist

开发者 https://www.devze.com 2023-01-03 05:36 出处:网络
This means \"if exist\" if($.cookie(\"movies_list\")) {开发者_JAVA技巧 // do something } How to write \"if not exist\" without changing the structure?Prepend the not operator !

This means "if exist"

if($.cookie("movies_list")) {开发者_JAVA技巧
// do something
}

How to write "if not exist" without changing the structure?


Prepend the not operator !

if(! $.cookie("movies_list")) {
// do something
}

! Operator

0

精彩评论

暂无评论...
验证码 换一张
取 消