var src = $(this_image).attr('src') || '' ;
上面的代码看起来像php中的条件操作吗?
最佳答案
这意味着如果$(this_image).attr('src')
未定义。 src
将等于 ''
关于jquery - 它的代码是否类似于 php 中的条件操作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11715628/
标签 jquery
var src = $(this_image).attr('src') || '' ;
上面的代码看起来像php中的条件操作吗?
最佳答案
这意味着如果$(this_image).attr('src')
未定义。 src
将等于 ''
关于jquery - 它的代码是否类似于 php 中的条件操作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11715628/