//Js判断某个变量是等于未定义
var name;
typeof(name)!=”undefined”
//JQuery获取下拉框中选中的option
var unit = $(‘#unitSelect option:selected’);
alert(unit.id);//可以打印出当前选中元素的属性
Js&JQuery常用集绵
最新推荐文章于 2024-06-12 00:50:52 发布
//Js判断某个变量是等于未定义
var name;
typeof(name)!=”undefined”
//JQuery获取下拉框中选中的option
var unit = $(‘#unitSelect option:selected’);
alert(unit.id);//可以打印出当前选中元素的属性