[英]font Awesome As Value Of Submit button
I would like display a font awesome icon as the submit input value. 我想显示一个字体真棒图标作为提交输入值。 I tried the following code as per this SO question Font-awesome, input type 'submit'
我按照此SO问题尝试了以下代码字体超赞,输入类型为'submit'
Demo http://jsfiddle.net/sw87W/1077/ 演示http://jsfiddle.net/sw87W/1077/
$(document).ready(function() {
$('.btn-primary').val('');
});
I do not have any control over the html that is generated, therefore I can not change the input
to a button
我对生成的html没有任何控制权,因此我无法将
input
更改为button
您可以只使用Unicode转义序列 :
$('.btn-primary').val('\uf0c7');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.