`document.category.options[...]` 失效,`document.form1.category.options[...]` 成功,以為 select 必須在 form 內。
`document.xxx` 只能存取 **`name` 屬性** 的表單元素(歷史遺留 `document.forms['formName']['elementName']` 簡寫),**不支援 `id` 選取**。
// 給 select 加 id
// 直接用標準 DOM API
var sel = document.getElementById('category');
sel.options[tt] = new Option("", "");
或 `document.querySelector('#category')`。**不需要包在 form 裡**。