前端js獲取checkbox的值 1、 var old = $("#old").val(); if (old != null && old != 'undefined' && old != '') { ...