jquery替换IE8中cufon使用的表单输入时出现问题
我有4个输入按钮,我想用cufon替换。我读过关于stackoverflow的一个策略,其中包括隐藏输入字段并显示具有相同内容的跨度,以便cufon可以替换它。我在chrome、firefox和IE9中都可以使用它,但在IE8中,没有任何东西可以替代隐藏的div。这是我正在使用的代码jquery替换IE8中cufon使用的表单输入时出现问题,jquery,internet-explorer,cufon,Jquery,Internet Explorer,Cufon,我有4个输入按钮,我想用cufon替换。我读过关于stackoverflow的一个策略,其中包括隐藏输入字段并显示具有相同内容的跨度,以便cufon可以替换它。我在chrome、firefox和IE9中都可以使用它,但在IE8中,没有任何东西可以替代隐藏的div。这是我正在使用的代码 $(document).ready(function() { $('#utmodes input').each(function(){ $(this).hide().afte
$(document).ready(function() {
$('#utmodes input').each(function(){
$(this).hide().after('<span id="' + $(this).attr('id') + '" class="input-button">').next('span.input-button').addClass($(this).attr('class')).text($(this).val()).click(function(){
$(this).prev('input').click();
Cufon.replace('#utmodes span', {
hover: true
});
});
});
实际页面为。这4个输入字段是文件上传、flash上传等。在ie 8中,您将看到这4个输入的空白点。发现了问题。我在添加span标记时使用了close。之后