:[ITbriefness:框架地址](http://bbsui.cn/IT/ITbriefness.js)
##ITbriefness由小仙开发##
ITbriefness使用方式如下:
1. 使用$符合进行定位
示例:$(".i").innerHTML="内容";
2.
示例:content(".i","内容");输出内容
content(".i")获取元素内容
3. ajax
参数 默认值 描述 可选值
url "" 请求的链接 string
type get 请求的方法 get,post
data null 请求的数据 object,string
contentType "" 请求头 string
dataType "" 请求的类型 jsonp
async true 是否异步 blooean
timeOut undefined 超时时间 number
before function(){} 发送之前执行的函数 function
error function(){} 请求报错执行的函数 function
success function(){} 请求成功的回调函数 function
示例:
ajax({
type:"post",
url:"",
timeOut:5000,
before:function(){
console.log("before");
},
success:function(str){
console.log(str);
},
error:function(){
console.log("error");
}
});
5. click单击事件
示例:
click("#i",function (){
console.log("欢迎使用ITbriefness框架");
})
6. ondblclick双击事件
示例:
ondblclick("#i",function (){
console.log("欢迎使用ITbriefness框架");
})
7. mouseout右击事件
示例:
mouseout("#i",function (){
console.log("欢迎使用ITbriefness框架");
})
8. mouseover悬浮事件
mouseover("#i",function (){
console.log("欢迎使用ITbriefness框架");
})
9. cookie
setCookie('key','data',time);
getCookie('key');
removeCookie('key');
10. spin旋转
spin("#i");
spin("#i",true);
11. text
text("#i");
text("#i","ITbriefness");
12. html
html("#i);
html("#i","<h1>ITbriefness</h1>");
13. val
val("#i")
val("#i","ITbriefness");
14. dommdu
var a=dommdu("div");
console.log(a);
15. animate
animate($("#i"), {
"width":"1000",
"height":"100",
"opacity":"0.5",
}, 1000,function () {
alert("动画执行成功")
})
15. intercept
var arr='<ul class="cl"><li><a href="/touxiang/qinglv/2021/1173561.html"target="_blank"><img src="https://img2.woyaogexing.com/2021/09/11/209c74ebe95d4b5eaaca4f4882ba78a7!400x400.jpeg"width="140"height="140"alt="迟妤-优质情头./">迟妤-优质情头.</a></li><li><a href="/touxiang/nv/2021/1173520.html"target="_blank"><img src="https://img2.woyaogexing.com/2021/09/11/3da3e79858134343aa83fdfaa0b8dac8!400x400.jpeg"width="140"height="140"alt="秋天太适合穿卫衣手牵手了">秋天太适合穿卫</a></li><li><a href="/touxiang/katong/2021/1173493.html"target="_blank"><img src="https://img2.woyaogexing.com/2021/09/11/2e27aa5f508743d29354d8856968acab!400x400.jpeg"width="140"height="140"alt="拿图点赞,喜欢关注❤️#萌了吧唧的闺蜜头像,太犯规了">拿图点赞,喜欢关</a></li><li><a href="/touxiang/katong/2021/1173491.html"target="_blank"><img src="https://img2.woyaogexing.com/2021/09/11/8a768652e32d4fa48d862f69477d0928!400x400.jpeg"width="140"height="140"alt="の:插画师namendart">の:插画师namend</a></li><li><a href="/touxiang/nv/2021/1173487.html"target="_blank"><img src="https://img2.woyaogexing.com/2021/09/11/f5f51042fac1449eaefd293bcb759430!400x400.jpeg"width="140"height="140"alt="拿图点赞,喜欢关注❤️#颜值超可的女头,你值得拥有">拿图点赞,喜欢关</a></li><li><a href="/touxiang/nv/2021/1173482.html"target="_blank"><img src="https://img2.woyaogexing.com/2021/09/11/cbf14e26e4144c2ea05ff9ad037db302!400x400.jpeg"width="140"height="140"alt="纯欲风女生头像">纯欲风女生头像</a></li><li><a href="/touxiang/nan/2021/1173478.html"target="_blank"><img src="https://img2.woyaogexing.com/2021/09/11/b7d31806435e42dd8011f532bf56732a!400x400.jpeg"width="140"height="140"alt="原来市井之处的我们,也都曾望着清冷的月亮">原来市井之处的</a></li><li><a href="/touxiang/qinglv/2021/1173471.html"target="_blank"><img src="https://img2.woyaogexing.com/2021/09/11/db833319bdee467680735bc4bde24dc0!400x400.jpeg"width="140"height="140"alt="炒鸡好看的情侣头像">炒鸡好看的情侣</a></li></ul>'
var s='class="cl">'
var o='</ul>'
console.log(intercept(arr,s,o));
16. append
for (let i=0; i<10;i++){
append("#p",'<h2>'+i+'</h2>')
}
17. eccddf
console.log(eccddf("alert('欢迎使用')",true));
console.log(eccddf("alert%28%27%u5E25%u54E5%27%29",false,true));
18. fb
console.log(fb(30))
19. width
hidth
console.log(width(".i"))
console.log(hidth(".i"))
20. typer
let str = '试着放纵自己,却总牵绊于过多的束缚,<br>依循着规律生活的只是一具失去灵魂的躯壳。'
typer("#contents",str)
21. parents
parents($("#i"),$("#i1"));
22. tinyImgUpload图片预览上传
var options = {
path: '',
onSuccess: function (res) {
console.log(res);
},
onFailure: function (res) {
console.log(res);
}
}
click('.submit',
tinyImgUpload('#upload', options)
);
23. bothtext
<input type="text" value="ITbriefness">
<span></span>
bothtext("input","span")
24. bothhtml
<input type="text" value="<h1>ITbriefness</h1>">
<span></span>
bothhtml("input","span")