我正在使用bootstrap 3作为我的rails应用程序.在视图页面中,未显示引导程序图标.
我的文件夹结构看起来像.
app/assets/stylesheets/bootstrap.min.css
app/assets/fonts/ ###font files
app/assets/images/ ###image files
Run Code Online (Sandbox Code Playgroud)
在bootstrap.min.css里面我调用font-family,如下所示
@font-face{font-family:'Glyphicons Halflings';src:url('../fonts/glyphicons-halflings-regular.eot');src:url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),url('../fonts/glyphicons-halflings-regular.woff') format('woff'),url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg')}
Run Code Online (Sandbox Code Playgroud)
如果我做错了,请纠正我.
更新:
用于显示图标的代码:
<a title="edit" href="<%= edit_customer_customer_path(cust, from: "admin")%>">
<i class="icon-pencil bigger-130"></i>
</a>
Run Code Online (Sandbox Code Playgroud) 我有一个如下所述的字符串.
str="[{\"id\":\"100\",\"sal_id\":10009,\"playback_url\":\"http:www.example_com\",\"profile\":\"v5\",\"protocol\":\"ttp\",\"vwidth\":40,\"vheight\":30,\"vbitrate\":1200,\"abitrate\":160,\"status\":\"queue\"}]"
Run Code Online (Sandbox Code Playgroud)
从上面的字符串我想只采取playback_url值,即 http:www.example.com.
我尝试过拆分,但它不起作用.喜欢
str.split("playback_url").join(',')
Run Code Online (Sandbox Code Playgroud)
请帮助我实现这一目标.提前致谢.
我的输入如下
input = "hello <script>alert("I am stealing your data");</script>"
Run Code Online (Sandbox Code Playgroud)
我想从字符串中删除完整的脚本标签,并且输出应类似于
output = "hello"
Run Code Online (Sandbox Code Playgroud)
尝试了以下命令,但未删除完整标签。
input.replace(/(<([^>]+)>)/ig, ''));
Run Code Online (Sandbox Code Playgroud)
它给我们结果
"hello alert("I am stealing you data");"
Run Code Online (Sandbox Code Playgroud)