Javascript Jquery09自定义属性操作 滚动相关scrollTop 表单操作等.ppt

Javascript Jquery09自定义属性操作 滚动相关scrollTop 表单操作等.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Js、JQuery Vip Jery老师 属性操作相关方法 获取属性: obj.getAttribute(key); 设置属性: obj.setAttribute(key,value); 移除属性: obj.removeAttribute(key); 注意: . [] 不能修改自定义属性 BOM : (Browser Object Model) (对浏览器的一些操作) window.open(); //打开一个新窗口, 参数1:[href] , 参数2:[target] //返回新窗口的window对象; window.close(); //关闭窗口,浏览器禁止问题,作用不大 window.navigator.userAgent //浏览器信息 window.location //地址信息 [href] [search] [hash] 滚动距离 document.body.scrollTop // scrollLeft document.documentElement.scrollTop // scrollLeft 兼容写法: document.documentElement.scrollTop || document.body.scrollTop; window.onresize = function(){} window.onscroll = function(){} jQuery里面置顶操作 $(window).scroll(); clientHeight / offsetHeight / scrollHeight 区别 表单操作: 可以用过name名获取改变值; form.user.value = Jery; 表单事件: onchange // 表单值发生改变时触发(text/radio/checkbox/select) onsubmit // 提交表单时触发 onreset // 重置时触发 onfocus //获得焦点触发 onblur // 失去焦点触发 .focus() .blur() 作业! 1.熟悉对于自定义属性的操作方法,attr()方法如何封装? 2.了解滚动距离,会写置顶操作(iconfont线上与项目) 3.熟悉clientHeight/offsetHeight/scrollHeight的用法 4.熟悉表单的操作(onchange/onfocus/onsubmit/onreset) 5.尽量写一个表单验证,下节课讲!写总结,练习! 提交格式:学号+昵称+真实姓名 Jery老师QQ邮箱:915884779@ 付出不亚于任何人的努力,让优秀成为一种习惯! 谢谢观赏 更多精彩请访问 潭州学院官网: TechEd 2012 ? 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

文档评论(0)

xingyuxiaxiang + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档