TL; DR单击链接
我的输入元素处于罢工状态并且拒绝工作.我已经删除了它以隔离变量,我发现了一些解决问题的方法,但我知道这里还有其他东西......
根据SO指南的HTML和CSS:
<div class="fl half">
<div class="input-wrap">
<input />
</div>
<div class="input-wrap">
<input />
</div>
<div class="clear"></div>
</div>
<div class="fr half">
<div class="input-wrap">
<input />
</div>
<div class="input-wrap">
<input />
</div>
<div class="clear"></div>
</div>
<div class="input-wrap">
<select>
<option>Select</option>
</select>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS:
.fl { float: left; }
.fr { float: right; }
.half { width: 50%; }
input { border: 1px solid black; }
.input-wrap { margin-bottom: 14px; position: relative; }
.clear { clear: both; }
Run Code Online (Sandbox Code Playgroud) $(document).ready().$(document).ready().$(document).ready()吗?Widget.init()查询元素吗?选项1
Widget = {
ele : $('#ele'),
init : function(){ ... }
};
$(document).ready(function(){
Widget.init();
});
Run Code Online (Sandbox Code Playgroud)
选项2
Widget = (function(){
var privateEle = $('#privateEle');
return {
publicEle: $('#publicEle'),
init: function(){ ... }
};
}());
$(document).ready(function(){
Widget.init();
});
Run Code Online (Sandbox Code Playgroud) 我经常使用Find CTRL/CMD + F找到特别的东西.在Chrome开发工具中,在我的家用计算机上,所有3个范围都有效:
在这台工作的计算机上,按CMD+F(它的Mac)只能在上面列出的前两个范围内工作,我似乎无法在资源选项卡上显示菜单来搜索外部资源.
有什么建议?也许这只是Mac和Windows版本之间的细微差别?
Chrome: Version 32.0.1700.77
OS X: Version 10.8.4
Run Code Online (Sandbox Code Playgroud) 以下示例位于Preact主页上.我想知道如何/为什么在类花括号中有等于=赋值和分号.我用谷歌搜索了几分钟,似乎无法搞清楚.;{}
这是TypeScript还是其他一些花哨的JS堂兄?花括号看起来像常规赋值,而不是类定义.
export default class TodoList extends Component {
state = { todos: [], text: '' };
setText = e => {
this.setState({ text: e.target.value });
};
addTodo = () => {
let { todos, text } = this.state;
todos = todos.concat({ text });
this.setState({ todos, text: '' });
};
render({ }, { todos, text }) {
return (
<form onSubmit={this.addTodo} action="javascript:">
<input value={text} onInput={this.setText} />
<button type="submit">Add</button>
<ul>
{ todos.map( todo => ( …Run Code Online (Sandbox Code Playgroud) 如果您查看React docs markdown文件(用于生成docs html页面),您将在最顶部看到一个值表(在.md,而不是.html).如果查看用于创建表的实际markdown语法,您将看到非标准表语法:
---
id: hello-world
title: Hello World
permalink: docs/hello-world.html
prev: installation.html
next: introducing-jsx.html
redirect_from:
- "docs/index.html"
- "docs/getting-started.html"
- "docs/getting-started-ko-KR.html"
- "docs/getting-started-zh-CN.html"
---
Run Code Online (Sandbox Code Playgroud)
我能找到的所有GitHub/markdown资源都表明这些表是这样创建的:
来自https://guides.github.com/features/mastering-markdown/
表
您可以通过组合单词列表并用连字符
-(对于第一行)分隔它们,然后用管道分隔每个列来创建表格|:Run Code Online (Sandbox Code Playgroud)First Header | Second Header ------------ | ------------- Content from cell 1 | Content from cell 2 Content in the first column | Content in the second column
我已经用尽了谷歌的谷歌技能,并想知道是否有人知道这是否是一个记录的功能,以及该文档可能在哪里?
javascript ×2
css ×1
ecmascript-6 ×1
github ×1
html ×1
input ×1
jquery ×1
markdown ×1
preact ×1
reactjs ×1