Yuj*_* Wu 9 html5 haml ruby-on-rails
哈姆可以渲染
%input{:type=>"text"}
Run Code Online (Sandbox Code Playgroud)
如
<input type="text">
Run Code Online (Sandbox Code Playgroud)
想知道haml应该是什么,所以它在html中呈现为
<input type="text" required>
Run Code Online (Sandbox Code Playgroud)
谢谢
mat*_*att 13
%input{:type=>"text", :required => true}
Run Code Online (Sandbox Code Playgroud)
它将呈现为
<input required type='text'>
Run Code Online (Sandbox Code Playgroud)
如果format选项是:html4或:html5,或作为
<input required='required' type='text' />
Run Code Online (Sandbox Code Playgroud)
如果格式是:xhtml.
如果值为false,则将完全省略:
<input type='text' />
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
19764 次 |
| 最近记录: |