美文网首页
2018-06-30

2018-06-30

作者: 枫叶落尽 | 来源:发表于2018-07-01 00:06 被阅读0次

p11

  • presentation提交; 演出; 陈述,报告; 颁奖仪式
  • event handling事件处理
    somewhat complex and 稍微有点复杂 riddled with 充满 incompatibilities.不兼容
    thoroughly tested 彻底地,完全
    identify 识别

jQuery获取页面对象(元素)
用id获取:$("#元素id");

在控制台创建元素:
用js创建,可以添加到dom节点
这是为什么?jquery创建的元素和js不一样?
难道用jQuery创建的元素只能用jQuery的方法添加到父节点?

关于append和appendTo
相当于给和拿的意思。append是拿,拿别的东西过来加到自身。appendTo是给,把自己加到别的东西那。

未验证:
test.innerHTML:
  从对象的起始位置到终止位置的全部内容,包括Html标签。
test.innerText:
  从起始位置到终止位置的内容, 但它去除Html标签
test.outerHTML:
  除了包含innerHTML的全部内容外, 还包含对象标签本身。

shift gears 换档,改变着眼点

p12

sophisticated 复杂得,精致的
mechanisms for storing data 数据存储机制
arbitrary graphics 任意图形
an assortment of 各式各样的
specified by 由。。。规定,制定
cross-platform 跨平台
targeting 瞄准,对准
Loan 贷款
heavily commented 大量注释,意思是注释很详尽
demonstrates 演示,展示

p13

<!DOCTYPE html>  <!DOCTYPE html>  html5标记
<html> 
<head>
<title>JavaScript Loan Calculator</title> 
<style> /* This is a CSS style sheet: it adds style to the program output */
.output { font-weight: bold; } /* Calculated values in bold */把output类得元素的font-weight属性设置为bold

font-weight 属性设置文本的粗细。
具体属性:

可选值(option、选项) 说明
normal 默认值。 定义标准的字符。
bold 定义粗体字符。
bolder 定义更粗的字符。
lighter 定义更细的字符。
100 定义由粗到细的字符。400 等同于 normal,而 700 等同于 bold。
200
300
400
500
600
700
800
900
inherit 规定应该从父元素继承字体的粗细。
#payment { text-decoration: underline; } /* For element with id="payment" */根据id获取元素将text-decoration属性设置为 underline

这个属性允许对文本设置某种效果,如加下划线。

描述
none 默认。定义标准的文本。
underline 定义文本下的一条线。
overline 定义文本上的一条线。
line-through 定义穿过文本下的一条线。
blink 定义闪烁的文本。
inherit 规定应该从父元素继承 text-decoration 属性的值。

相关文章

网友评论

      本文标题:2018-06-30

      本文链接:https://www.haomeiwen.com/subject/zcwzyftx.html