小智 7
$('.input-button').each(function(){
$(this).hide().after('<span class="input-button">').next('span.input-button').text($(this).val()).click(function(){
$(this).prev('input.input-button').click();
});
});
Run Code Online (Sandbox Code Playgroud)
我使用上面的代码将我的输入值复制到span中,这允许我使用cufon.它工作得很好,但仍然会在禁用javascript的情况下回退到"提交"输入.
以下列方式使用该元素:
<button type="buton">value</button>
Run Code Online (Sandbox Code Playgroud)
应用Cufon风格时工作:
Cufon.replace('button', {color: '-linear-gradient(#999, 0.45=#666, 0.45=#555, #999)'});
Run Code Online (Sandbox Code Playgroud)
非常感谢 :)
归档时间: |
|
查看次数: |
10502 次 |
最近记录: |