怎么去掉jquery mobile 自动添加的样式

如题所述

方法1:
使用jquery在创建后对所有元素增加属性

Java代码
$(document).bind( "pagecreate", function( e ) {
$( "input, textarea, select", e.target ).attr( "data-" + $.mobile.ns + "role", "none" );
});

方法2:
在jquery.js导入后,在jquerymobile导入前使用下面的脚本加上data-role="none".

Java代码
$("input").attr('data-role','none');
$("select").attr('data-role','none');
温馨提示:答案为网友推荐,仅供参考
相似回答