<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<tbody>
<script>
function getStyle(element, styleName){
if(element.currentStyle){
return element.currentStyle[styleName];
}else{
return getComputedStyle(element)[styleName];
}
}
</script>
</tbody>
<tbody>
<script>
var e = window.event||evt;
console.log(e.keyCode);
</script>
</tbody>
<tbody>
<script>
function next(current){
var n = current.nextSibling;
while( n ){
if(n.nodeType == 1){
return n;
}
n = n.nextSibling;
}
}
</script>
</tbody>
<tbody>
<script>
function addEvent(element, type, chuli){
if(element.addEventListener){
element.addEventListener(type, chuli);
}else{
element.attachEvent('on' + type, chuli);
}
}
function removeEvent(element, type, chuli) {
if(element.removeEventListener){
element.removeEventListener(type, chuli);
}else{
element.detachEvent('on'+type, chuli);
}
}
</script>
</tbody>
<tbody>
<script>
function zuzhi(e){
if(e.stopPropagation){
e.stopPropagation();
}else{
e.cancelBubble = true;
}
}
</script>
</tbody>
<tbody>
<script>
function zuzhi(e) {
if(e.preventDefault){
e.preventDefault();
}else{
e.returnValue = false;
}
}
</script>
</tbody>
<tbody>
<script>
function setOpacity(ele, val){
if(ele.filters){
ele.style.filter = "alpha(opacity=" + val*100 + ")";
}else{
ele.style.opacity = val;
}
}
</script>
</tbody>
</body>
</html>