1 Star 1 Fork 0

CheriSh_Meng/ec-do

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
html.html 971 Bytes
一键复制 编辑 原始数据 按行查看 历史
wanniutest 提交于 2017-11-16 15:43 +08:00 . 整理代码
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
#div1{
color: #f00;
display: none;
}
</style>
</head>
<body>
<div class="div1"></div>
<div class="div1"></div>
<div id="div2"></div>
<div id="div1"></div>
<div class="div1"></div>
<div class="div1"></div>
</body>
<script src="src/ec-do-1.1.4.js"></script>
<script type="text/javascript">
window.onload=function () {
let oDiv1 =document.querySelectorAll("div");
for (let i = 0,len = oDiv1.length; i < len; i++){
oDiv1[i].onclick = function(){
console.log(i)
}
}
//let ecDo =require('./dist/ec-do-2.0.0.js');
let oDiv=document.getElementById("div1");
ecDo.show(oDiv);
ecDo.text(oDiv,'<div id="div1">45132134656</div>');
let odiv2=ecDo.siblings(oDiv,'#div2')
ecDo.css(odiv2[0],{'height':'300px','width':'300px','background':'#ccc'})
}
</script>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/pingm/ec-do.git
git@gitee.com:pingm/ec-do.git
pingm
ec-do
ec-do
master

搜索帮助