没有合适的资源?快使用搜索试试~ 我知道了~
rails已经为我们提供了一个方法: Ruby代码 图形验证码的使用等 加密字符串 格式化数字以千分位形式显示
资源推荐
资源详情
资源评论
----------
helper number_to_currency
A:View
1。Helper number_to_currency(@book.price)格式化显示时间,$89.00,合适开发英文网站。
-----
form
2。图片按钮提交表单,
Html代码
<input type='image' src='/images/button2.gif' style='width:120px;height:30px;'/>
把它放在<form>内,和submit button的作用一样,另说明一下,这个网站上可以在线为我们生成自行设置的图片,很方便,http://www.buttonator.com/,我又看了一下这个网站,感觉它也很优秀,http://www.mycoolbutton.com
--------
web开发
onmouseover="this.style.background=‘#ffcdf;"
4。鼠标放上去变色,这个虽然是HTML方面的代码,但是在WEB开发中也用得比较多,所以记一下。
Html代码
onmouseover="this.style.background='#FFFCDF';" onmouseout="this.style.background='#FFF';"
-----------
信息显示 error
helper number_to_currency
A:View
1。Helper number_to_currency(@book.price)格式化显示时间,$89.00,合适开发英文网站。
-----
form
2。图片按钮提交表单,
Html代码
<input type='image' src='/images/button2.gif' style='width:120px;height:30px;'/>
把它放在<form>内,和submit button的作用一样,另说明一下,这个网站上可以在线为我们生成自行设置的图片,很方便,http://www.buttonator.com/,我又看了一下这个网站,感觉它也很优秀,http://www.mycoolbutton.com
--------
web开发
onmouseover="this.style.background=‘#ffcdf;"
4。鼠标放上去变色,这个虽然是HTML方面的代码,但是在WEB开发中也用得比较多,所以记一下。
Html代码
onmouseover="this.style.background='#FFFCDF';" onmouseout="this.style.background='#FFF';"
-----------
信息显示 error
flash
5。改进Flash消息的显示。Flash消息显示4秒后,淡出。
Html代码
<% if flash[:warning] or flash[:notice] %>
<div id="flash_message" <% if flash[:warning] %>class="warning"<% elsif flash[:notice] %>class='notice'<% end %> >
<%= flash[:warning] || flash[:notice] %>
</div>
<script type="text/javascript">
setTimeout("new Effect.Fade('flash_message');", 4000)
</script>
<% end %>
别忘记了<%= javascript_include_tag :defaults %>,另外,对于Flash消息显示的css代码如下,
Html代码
.notice{
margin-top:5px;
padding: 8px;
border-top:2px solid #73E673;
border-bottom:2px solid #73E673;
background:#B6F2B6;
}
.warning{
margin-top:5px;
padding: 8px;
border-top:2px solid #FFF280;
border-bottom:2px solid #FFF280;
background:#FFF9BF;
5。改进Flash消息的显示。Flash消息显示4秒后,淡出。
Html代码
<% if flash[:warning] or flash[:notice] %>
<div id="flash_message" <% if flash[:warning] %>class="warning"<% elsif flash[:notice] %>class='notice'<% end %> >
<%= flash[:warning] || flash[:notice] %>
</div>
<script type="text/javascript">
setTimeout("new Effect.Fade('flash_message');", 4000)
</script>
<% end %>
别忘记了<%= javascript_include_tag :defaults %>,另外,对于Flash消息显示的css代码如下,
Html代码
.notice{
margin-top:5px;
padding: 8px;
border-top:2px solid #73E673;
border-bottom:2px solid #73E673;
background:#B6F2B6;
}
.warning{
margin-top:5px;
padding: 8px;
border-top:2px solid #FFF280;
border-bottom:2px solid #FFF280;
background:#FFF9BF;
剩余8页未读,继续阅读
资源评论
嚜啡定律
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功