1
0
forked from GitHub/gf-core

support.js: create buttons with access keys

This commit is contained in:
hallgren
2010-09-10 12:20:07 +00:00
parent 2d75820da4
commit 17cf4e1276

View File

@@ -130,10 +130,11 @@ function tr(cells) {
return tr;
}
function button(label,action) {
function button(label,action,key) {
var el=empty("input","type","button");
el.setAttribute("value",label);
el.setAttribute("onclick",action);
if(key) el.setAttribute("accesskey",key);
return el;
}