Django路由使用問題

光之继承人發表於2024-03-22
$('select[name=select_month]').each(function (index) {
    month_list = response["time_dict"][response["year"]]
    select_menu = $(this)
    month_list.forEach(function (month) {
        if (month == response["month"]) {
            select_menu.append(`<option selected>${month}</option>`)
        } else {
            select_menu.append(`<option>${month}</option>`)
        }
    })
})

相關文章