CSS美化的按钮
var btn = {
init : function() {
if (!document.getElementById || !document.createElement || !document.appendChild) return false;
as = btn.getElementsByClassName('btn(.*)');
for (i=0; i
if ( as[i].tagName == "INPUT" && ( as[i].type.toLowerCase() == "submit" || as[i].type.toLowerCase() == "button" ) ) {
var a1 = document.createElement("a");
a1.appendChild(document.createTextNode(as[i].value));
a1.className = as[i].className;
a1.id = as[i].id;
as[i] = as[i].parentNode.replaceChild(a1, as[i]);
as[i] = a1;
as[i].style.cursor = "pointer";
}
else if (as[i].tagName == "A") {
var tt = as[i].childNodes;
}
else { return false };