摘要: <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <title>我的购物车-品优购</title> <meta name="description" content="品优购JD.COM-专业的综合网上购物商城,销售家 阅读全文
posted @ 2022-04-24 15:56 罗砂 阅读(79) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2022-04-24 15:38 罗砂 阅读(67) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2022-04-24 15:37 罗砂 阅读(74) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2022-04-24 15:36 罗砂 阅读(40) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2022-04-24 15:36 罗砂 阅读(61) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2022-04-24 15:34 罗砂 阅读(40) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2022-04-24 15:33 罗砂 阅读(41) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2022-04-24 15:33 罗砂 阅读(75) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2022-04-24 15:32 罗砂 阅读(30) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2022-04-24 15:31 罗砂 阅读(38) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2022-04-24 15:31 罗砂 阅读(28) 评论(0) 推荐(0)
摘要: 上: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-eq 阅读全文
posted @ 2022-04-24 15:30 罗砂 阅读(56) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2022-04-24 15:29 罗砂 阅读(22) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2022-04-24 15:29 罗砂 阅读(62) 评论(0) 推荐(0)
摘要: 链式编程 链式编程时是为了节省代码量,看起来更优雅。 $(this).css('color','red').sibling().css('color',' ') <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta 阅读全文
posted @ 2022-04-24 15:28 罗砂 阅读(40) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2022-04-24 15:00 罗砂 阅读(48) 评论(0) 推荐(0)
摘要: jQuery设置样式 $('div').css('属性','值') 隐式迭代 遍历内部DOM元素(伪数组形式存储)的过程就叫做隐式迭代。 简单理解:给匹配到所有元素进行循环遍历,执行相应的方法,而不用我们再进行循环,简化我们的操作,方便我们调用。 <!DOCTYPE html> <html lang 阅读全文
posted @ 2022-04-24 14:54 罗砂 阅读(97) 评论(0) 推荐(0)
摘要: 原生JS获取元素方式很多,很杂,而且兼容性情况不一致,因此jQuery给我们做了封装,使获取元素统一标准 $("选择器") //里面选择器直接写CSS选择器即可,但是要加引号 基本选择器 名称 用法 描述 ID选择器 $("#id") 获取指定ID的元素 全选选择器 $(" * ") 匹配所有元素 阅读全文
posted @ 2022-04-24 14:45 罗砂 阅读(34) 评论(0) 推荐(0)
摘要: 1.用原生JS来获取的对象就是DOM对象 2.jQuery方法获取的元素就是jQuery对象 3.jQuery对象本质是:利用$对DOM对象包装后产生的对象(伪数组形式储存) <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> 阅读全文
posted @ 2022-04-24 14:14 罗砂 阅读(93) 评论(0) 推荐(0)
摘要: 1.$是jQuery的别称,在代码中可以使用jQuery代替$,但一般为了方便,通常都直接使用$。 2.$是jQuery的顶级对象,相当于原生JavaScript中的window。把元素利用$包装成jQuery对象,就可以调用jQuery的方法 <!DOCTYPE html> <html lang= 阅读全文
posted @ 2022-04-24 13:54 罗砂 阅读(77) 评论(0) 推荐(0)