前端
阻止冒泡的兼容性写法
小恋 发表于2019-08-09 浏览1002 评论0
function stopBubble(e){if(e&&e.stopPropagation){e.stopPropagation();}else{window.event.cancelBubble=true;}}
JavaScript
用原生javascript封装一个对话框
小恋 发表于2019-05-30 浏览928 评论0
<!DOCTYPE html><html><head><meta charset="UTF-8"><title>dialog demo</title><style>* {margin: 0;padding: 0;}a {text-decoration: none;}#Dialog {width: 100%;height: 100%;background-color: rgba(0, 0, 0,