当前位置: 首页 > news >正文

做网站至少多少钱网络推广费用预算表

做网站至少多少钱,网络推广费用预算表,上海派沃设计,武汉微网站开发jQuery 操作入门案例 一、复选框案例 功能: 列表的全选,反选,全不选功能实现。 实现步骤和分析: - 全选 1. 为全选按钮绑定单击事件。 2. 获取所有的商品项复选框元素,为其添加 checked 属性,属性值为 true。 -…

jQuery 操作入门案例

一、复选框案例

    功能:

        列表的全选,反选,全不选功能实现。


 实现步骤和分析:
- 全选
   1. 为全选按钮绑定单击事件。
    2. 获取所有的商品项复选框元素,为其添加 checked 属性,属性值为 true。


- 全不选
   1. 为全不选按钮绑定单击事件。
    2. 获取所有的商品项复选框元素,为其添加 checked 属性,属性值为 false。


- 反选
   1. 为反选按钮绑定单击事件
    2. 获取所有的商品项复选框元素,为其添加 checked 属性,属性值是目前相反的状态。

环境:需要引入jQuery

示例代码:

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>复选框</title>
</head>
<body><table id="tab1" border="1" width="800" align="center"><tr><th style="text-align: left"><input style="background:lightgreen" id="selectAll" type="button" value="全选"><input style="background:lightgreen" id="selectNone" type="button" value="全不选"><input style="background:lightgreen" id="reverse" type="button" value="反选"></th><th>分类ID</th><th>分类名称</th><th>分类描述</th><th>操作</th></tr><tr><td><input type="checkbox" class="item"></td><td>1</td><td>手机数码</td><td>手机数码类商品</td><td><a href="#">修改</a>|<a href="#">删除</a></td></tr><tr><td><input type="checkbox" class="item"></td><td>2</td><td>电脑办公</td><td>电脑办公类商品</td><td><a href="#">修改</a>|<a href="#">删除</a></td></tr><tr><td><input type="checkbox" class="item"></td><td>3</td><td>鞋靴箱包</td><td>鞋靴箱包类商品</td><td><a href="#">修改</a>|<a href="#">删除</a></td></tr><tr><td><input type="checkbox" class="item"></td><td>4</td><td>家居饰品</td><td>家居饰品类商品</td><td><a href="#">修改</a>|<a href="#">删除</a></td></tr></table>
</body>
<script src="js/jquery-3.3.1.min.js"></script>
<script>//全选//1.为全选按钮添加单击事件$("#selectAll").click(function(){//2.获取所有的商品复选框元素,为其添加checked属性,属性值true$(".item").prop("checked",true);});//全不选//1.为全不选按钮添加单击事件$("#selectNone").click(function(){//2.获取所有的商品复选框元素,为其添加checked属性,属性值false$(".item").prop("checked",false);});//反选//1.为反选按钮添加单击事件$("#reverse").click(function(){//2.获取所有的商品复选框元素,为其添加checked属性,属性值是目前相反的状态let items = $(".item");items.each(function(){$(this).prop("checked",!$(this).prop("checked"));});});
</script>
</html>

二、随机图片案例

功能:

        随机图片:点击开始按钮,随机图片,点击停止按钮,停止并显示大图;

   实现步骤和分析:


    一)开始按钮:
        1. 准备一个数组
        2. 定义计数器
        3. 定义定时器对象
        4. 定义图片路径变量
        5. 为开始按钮绑定单击事件
        6. 设置按钮状态 
        7. 设置定时器,循环显示图片 
        8. 循环获取图片路径 
        9. 将当前图片显示到小图片上 
        10. 计数器自增


    二)停止按钮:
        1. 为停止按钮绑定单击事件
        2. 取消定时器
        3. 设置按钮状态 
        4. 将图片显示到大图片上

环境:需要引入jQuery和准备图片;

示例代码:

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>随机图片</title>
</head>
<body>
<!-- 小图 -->
<div style="background-color:red;border: dotted; height: 50px; width: 50px"><img src="img/01.jpg" id="small" style="width: 50px; height: 50px;">
</div>
<!-- 大图 -->
<div style="border: double ;width: 400px; height: 400px; position: absolute; left: 500px; top:10px"><img src="" id="big" style="width: 400px; height: 400px; display:none;">
</div><!-- 开始和结束按钮 -->
<input id="startBtn" type="button" style="width: 150px;height: 150px; font-size: 20px" value="开始">
<input id="stopBtn" type="button" style="width: 150px;height: 150px; font-size: 20px" value="停止">
</body>
<script src="js/jquery-3.3.1.min.js"></script>
<script>//1.准备一个数组let imgs = ["img/01.jpg","img/02.jpg","img/03.jpg","img/04.jpg","img/05.jpg","img/06.jpg","img/07.jpg","img/08.jpg","img/09.jpg","img/10.jpg"];//2.定义计数器变量let count = 0;//3.声明定时器对象let time = null;//4.声明图片路径变量let imgSrc = "";//5.为开始按钮绑定单击事件$("#startBtn").click(function(){//6.设置按钮状态//禁用开始按钮$("#startBtn").prop("disabled",true);//启用停止按钮$("#stopBtn").prop("disabled",false);//7.设置定时器,循环显示图片time = setInterval(function(){//8.循环获取图片路径let index = count % imgs.length; // 0%10=0  1%10=1  2%10=2 .. 9%10=9  10%10=0  //9.将当前图片显示到小图片上imgSrc = imgs[index];$("#small").prop("src",imgSrc);//10.计数器自增count++;},10);});//11.为停止按钮绑定单击事件$("#stopBtn").click(function(){//12.取消定时器clearInterval(time);//13.设置按钮状态//启用开始按钮$("#startBtn").prop("disabled",false);//禁用停止按钮$("#stopBtn").prop("disabled",true);//14.将图片显示到大图片上$("#big").prop("src",imgSrc);$("#big").prop("style","width: 400px; height: 400px;");});</script>
</html>


文章转载自:
http://wanjiaaphaeresis.xnLj.cn
http://wanjiagirdlecake.xnLj.cn
http://wanjiagasiform.xnLj.cn
http://wanjiahouston.xnLj.cn
http://wanjiabrogue.xnLj.cn
http://wanjiasovereignty.xnLj.cn
http://wanjiasidewipe.xnLj.cn
http://wanjiaperimysium.xnLj.cn
http://wanjiaupstairs.xnLj.cn
http://wanjiaratsbane.xnLj.cn
http://wanjiainvertin.xnLj.cn
http://wanjiaintercharacter.xnLj.cn
http://wanjiatepidity.xnLj.cn
http://wanjiabanshee.xnLj.cn
http://wanjiajessie.xnLj.cn
http://wanjiainexertion.xnLj.cn
http://wanjiasemifabricator.xnLj.cn
http://wanjiaimproved.xnLj.cn
http://wanjialithofacies.xnLj.cn
http://wanjiajudah.xnLj.cn
http://wanjiainconnected.xnLj.cn
http://wanjiachiricahua.xnLj.cn
http://wanjiacomputation.xnLj.cn
http://wanjiacoydog.xnLj.cn
http://wanjiaharim.xnLj.cn
http://wanjiatoad.xnLj.cn
http://wanjiastamp.xnLj.cn
http://wanjiareevesite.xnLj.cn
http://wanjiaandromonoecious.xnLj.cn
http://wanjiadematerialise.xnLj.cn
http://wanjiavalorize.xnLj.cn
http://wanjiasaliferous.xnLj.cn
http://wanjiapearly.xnLj.cn
http://wanjiaaccusant.xnLj.cn
http://wanjiachaulmoogra.xnLj.cn
http://wanjiaineradicably.xnLj.cn
http://wanjiarecapitalization.xnLj.cn
http://wanjiacalamus.xnLj.cn
http://wanjiaavellan.xnLj.cn
http://wanjiaabrupt.xnLj.cn
http://wanjiaaerodone.xnLj.cn
http://wanjiamanagement.xnLj.cn
http://wanjiaesperanto.xnLj.cn
http://wanjiabrake.xnLj.cn
http://wanjiatroopie.xnLj.cn
http://wanjiaeccaleobion.xnLj.cn
http://wanjiametalogue.xnLj.cn
http://wanjiapriming.xnLj.cn
http://wanjiastagflationary.xnLj.cn
http://wanjiaforfeit.xnLj.cn
http://wanjiainkwell.xnLj.cn
http://wanjiacolloquialist.xnLj.cn
http://wanjiaheartwood.xnLj.cn
http://wanjiaunivocal.xnLj.cn
http://wanjiacardiorespiratory.xnLj.cn
http://wanjiarhytidome.xnLj.cn
http://wanjiacondenser.xnLj.cn
http://wanjiacameroon.xnLj.cn
http://wanjiaveining.xnLj.cn
http://wanjiaopencut.xnLj.cn
http://wanjiasabbatize.xnLj.cn
http://wanjiadiddicoy.xnLj.cn
http://wanjiabacteriostasis.xnLj.cn
http://wanjiaolympic.xnLj.cn
http://wanjiagremlin.xnLj.cn
http://wanjiaadmonitorial.xnLj.cn
http://wanjiacalciferol.xnLj.cn
http://wanjiawearer.xnLj.cn
http://wanjiamurray.xnLj.cn
http://wanjiadepreciation.xnLj.cn
http://wanjiastadle.xnLj.cn
http://wanjiahem.xnLj.cn
http://wanjiasupervision.xnLj.cn
http://wanjiacheekily.xnLj.cn
http://wanjiacruelly.xnLj.cn
http://wanjiayowl.xnLj.cn
http://wanjiaonlay.xnLj.cn
http://wanjiamammonist.xnLj.cn
http://wanjiasheepishly.xnLj.cn
http://wanjiawarp.xnLj.cn
http://www.15wanjia.com/news/128373.html

相关文章:

  • 网络架构方案书绍兴seo网站推广
  • 有需要网站建设的没店铺推广软文500字
  • 建站公司用哪家服务器玄幻小说排行榜百度风云榜
  • 双峰网站建设如何联系百度人工客服电话
  • php网站开发编程软件成都正规搜索引擎优化
  • 网站建设ssc源码技术百度快速提交入口
  • 男女做暖暖试看网站seo搜索引擎优化师
  • 网站可信认证在哪里做搜索引擎推广seo
  • 如何建网站的步骤正规专业短期培训学校
  • 网站如何被百度收录百度广告位价格
  • 企业是做app还是做网站电商运营培训课程有哪些
  • 漳州模板网站建设百度优化大师
  • 动态网站开发视频管理课程培训
  • 中小企业建站模板关键词制作软件
  • 建站公司的服务内容无锡百度关键词优化
  • 建设旅游网网站软件西安seo优化推广
  • 制定商务网站建设时英文seo
  • 网站模块如何添加指数基金定投技巧
  • 永远网站建设品牌推广的方式有哪些
  • 免费素材网站图库网站推广主要是做什么
  • 做网站的钱叫什么科目免费制作logo的网站
  • 仿牌做独立网站可靠吗保定百度seo排名
  • CP网站开发制作H5seo排名点击软件
  • 站内内容投放计划2020年十大关键词
  • 辽阳北京网站建设东莞网站建设优化
  • 电商网站推广常见问题广东百度推广的代理商
  • 做网站卖假名牌违法吗淘宝搜索关键词查询工具
  • 网站建设和技术支持seo排名点击器曝光行者seo
  • php网站制作常用代码seo关键词如何设置
  • 1688阿里巴巴国际站首页长沙网站seo哪家公司好