How can I check if a checkbox is checked via jQuery?
Can I just add an ID or class to the element and do this?
if($('#element').val() == 1) {
//do stuff
}
Run Code Online (Sandbox Code Playgroud) 如何选择表格中的最后一行?
我知道我可以选择最后一个,SELECT item FROM table ORDER BY id DESC LIMIT 1但我想选择ALL而不是最后一个.
我怎样才能做到这一点?
选择一定数量并使用ASC将无效,因为我不知道有多少行.
我考虑过进行行计数并获取该数量并选择-1并使用ORDER BY id ASC但是有没有更简单的方法?
谢谢.