常常會想要從既有的資料中
找到對照的名稱的號碼
可以使用lookup查詢
Sheet1資料來源(一定要先遞增排序)
A數值 B資料名稱
1 aa
2 bb
3 cc
可使用=lookup("找尋值",搜尋目標範圍,顯示值欄位)
例如=lookup("bb",Sheet1!A:A,Sheet1!B:B)
就會找到2
搜尋
Excel找值對應lookup
Firefox 使用document.getElementById
注意label只能用innerHTML值
並沒有value的屬性
所以無法使用document.getElementById("id").value
如果要寫入值傳遞,還是使用hidden方式傳value比較單純
也是可以使用以下function取得物件function findObj(objname)
{
var obj = null;
if (typeof(document.getElementById) != "undefined")
obj = document.getElementById(objname);
else if (typeof(document.all) != "undefined")
obj = document.all[objname];
return(obj);
}
標籤: 程式 , Firefox , Javascript