摘要: 一、需求当有传属性name的值时,则显示Hello "name",否则显示Hello World二、4种方式的代码实现1.通过三元运算符 Document 2.通过变量 Document 3.直接在属性调用函数 Doc... 阅读全文
posted @ 2015-12-15 23:53 shamgod 阅读(5404) 评论(0) 推荐(0)
摘要: 1.代码 Document 2.运行结果3.运行后源码 Document你好React 阅读全文
posted @ 2015-12-15 23:33 shamgod 阅读(304) 评论(0) 推荐(0)
摘要: 一、程序步骤1.用React.createClass生成组件2.调用React.render把组件渲染到页面中,dom的操作由react自动完成二、代码 Document 运行结果:运行后的源代码: Document 你好React 阅读全文
posted @ 2015-12-15 22:09 shamgod 阅读(1766) 评论(0) 推荐(0)
摘要: 例子:(div+p#test>span.test2.test3)*5+p[name="hello"]>div.test4^a*5 阅读全文
posted @ 2015-12-15 21:47 shamgod 阅读(229) 评论(0) 推荐(0)
haha