首页 > Web开发 > 详细

419 JQuery and BootStrap

时间:2019-04-19 18:44:51      阅读:156      评论:0      收藏:0      [点我收藏+]

把葵花宝典剩下的知识讲完了 又学习了bootstrap

<link rel="stylesheet" href="css/bootstrap.css">
<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/jquery-3.4.0.min.js"></script>

三个文件必须要导入 :1: .CSS

2:bootstrap.js : CSS/HTML框架 前端网页框架 提供

3:jquery-3.4.0min.js :javascript的一个类库

js页面简便加载  window.onClick=function(){}

jQuery页面简便加载:$(function(){})

 

jQuery 葵花宝典    
js 和 jquery主要的区别 在 dom 想用jquery 必须先引入(顺序问题) 先css 在js: 先框架css在自己css 先jquery 在框架 在自己 找元素: js: document.getElement[s]By... id tagname name classname jquery: $(选择器) $(选择器).eq(下标) js找到的是js对象 jquery找到的是jquery对象 相互转 js->jquery $(jsDom) jquery->js $(‘div‘)[0] $(‘div‘).get(0) 两个对象 jsDom jqDom 操作内容: jsDom.innerHtml = 赋值 jsDmo.value jqDom.html() jqDom.html(‘赋值‘) jqDom.val() 操作样式 jsDom.style.color = 赋值 //只能操作行内样式 jqDmo.css(‘color‘); jqDmo.css(‘color‘,‘red‘); jqDom.removecss(‘color‘) jqDmo.css({ ‘color‘ : ‘red‘, ‘width‘ : ‘100px‘ ... }); 操作属性 jsDom.getAttribute(‘class‘); jsDom.setAttribute(‘class‘,‘add‘); jsDom.removeAttribute(‘class‘); jqDom.attr(‘class‘); jqDom.attr(‘class‘,‘add‘); jqDom.attr({ ‘data‘ : ‘add‘, ‘id‘ : ‘add‘, ... }); jQDom.removeAttr(‘class‘) jqDom.addclass(‘del‘) 操作事件 jsDom.onClick = function(){ this } jqDom.click(function(){ $(this) });

 

419 JQuery and BootStrap

原文:https://www.cnblogs.com/zs0322/p/10737740.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!