2020年6月6日

js中getComputedStyle()与currentStyle()、style()方法的区别

摘要: 1. obj.style:这个方法只能获取行内样式写在style属性中的值(style=”…”),而无法获取定义在<style type="text/css"></style>里面的属性。 2.obj.currentStyle和getComputedStyle 方法相同,但obj.currentSt 阅读全文

posted @ 2020-06-06 00:18 被窝暖暖嘻嘻嘻 阅读(325) 评论(0) 推荐(0) 编辑

2020年6月5日

js实现五星好评效果

摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document< 阅读全文

posted @ 2020-06-05 23:00 被窝暖暖嘻嘻嘻 阅读(727) 评论(0) 推荐(0) 编辑

js实现简易版放大镜(显示大图)

摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document< 阅读全文

posted @ 2020-06-05 22:58 被窝暖暖嘻嘻嘻 阅读(240) 评论(0) 推荐(0) 编辑

js实现综合验证表单及表单验证提交

摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document< 阅读全文

posted @ 2020-06-05 22:56 被窝暖暖嘻嘻嘻 阅读(470) 评论(0) 推荐(0) 编辑

2020年6月3日

js实现窗口拖拽最大最小化

摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document< 阅读全文

posted @ 2020-06-03 11:36 被窝暖暖嘻嘻嘻 阅读(786) 评论(0) 推荐(0) 编辑

js实现复选框的操作

摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>实现复选框的操作< 阅读全文

posted @ 2020-06-03 11:32 被窝暖暖嘻嘻嘻 阅读(3038) 评论(0) 推荐(0) 编辑

2020年6月2日

js实现模拟下拉菜单

摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>模拟下拉菜单t</ 阅读全文

posted @ 2020-06-02 09:13 被窝暖暖嘻嘻嘻 阅读(191) 评论(0) 推荐(0) 编辑

js实现跟随鼠标移动的提示框

摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document< 阅读全文

posted @ 2020-06-02 09:10 被窝暖暖嘻嘻嘻 阅读(762) 评论(0) 推荐(0) 编辑

2020年5月31日

JS利用正则表达式替换字符串中的内容

摘要: //从字符串'Is this a cat is'中剪去'is': var str='Is this a cat is'; var subStr=new RegExp('is');//创建正则表达式对象 var result=str.replace(subStr,"");//把'is'替换为空字符串 阅读全文

posted @ 2020-05-31 11:07 被窝暖暖嘻嘻嘻 阅读(1415) 评论(0) 推荐(1) 编辑

2020年5月29日

js动态选项卡

摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document< 阅读全文

posted @ 2020-05-29 23:07 被窝暖暖嘻嘻嘻 阅读(232) 评论(0) 推荐(0) 编辑

导航