公告
财富商城
积分规则
提问
发文
2020-02-13 09:27发布
SAY GOODBYE
Say I have the following:
$('#foo')
I'd like to know if that selector matches anything. How do I test for this?
Use a Javascript Console to see what your method call returns. Type your command into the console, and then hit enter.
Shortcuts to open a JS console:
if ($('#foo').length > 0) { // do things }
should do it
最多设置5个标签!
Use a Javascript Console to see what your method call returns. Type your command into the console, and then hit enter.
Shortcuts to open a JS console:
should do it