1、字符串时间转时间类型
function ConvertDateFromString(dateString) {
if (dateString) {
var arr1 = dateString.split(" ");
var sdate = arr1[0].split('-');
var date = new Date(sdate[0], sdate[1], sdate[2]);
return date;
}
}
2、设置select选中项
var street = getQueryString("CarModel");
$('#txtCarModelName option:contains(' + street + ')').each
(function () {
if ($(this).text() == street) {
$(this).attr('selected', true);
}
});
3、获取select选中项
$("#provinces").find("option:selected").text();