forked from GitHub/gf-core
support.js: create buttons with access keys
This commit is contained in:
@@ -130,10 +130,11 @@ function tr(cells) {
|
|||||||
return tr;
|
return tr;
|
||||||
}
|
}
|
||||||
|
|
||||||
function button(label,action) {
|
function button(label,action,key) {
|
||||||
var el=empty("input","type","button");
|
var el=empty("input","type","button");
|
||||||
el.setAttribute("value",label);
|
el.setAttribute("value",label);
|
||||||
el.setAttribute("onclick",action);
|
el.setAttribute("onclick",action);
|
||||||
|
if(key) el.setAttribute("accesskey",key);
|
||||||
return el;
|
return el;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user