我做了一个这样的脚本:
$("#last").bind("change", function() {
var myselect = document.getElementsByTagName("select");
var numselect = myselect.length;
var oldid = "select-" + numselect;
var newidslider = "slider-" + (numselect + 1);
$('#last').attr('name', oldid);
$('#last').attr('id', oldid);
$('#last').selectmenu("refresh", true);
$('#selects').append('<label for="last" class="select">scegli personaggio:</label><select name="last" id="last"><option value="pippo">pippo</option><option value="pluto">pluto</option><option value="paperino">paperino</option><option value="topolino">topolino</option></select><div class="spazio"></div><input type="range" name="' + newidslider + '" id="' + newidslider + '" value="50" min="0" max="100"/>').trigger('create');
});
当我使用 app safari mobile 或 chrome mobile 时它工作正常,但是当我在“添加到主屏幕”后访问我的网站时,js 不起作用!有谁知道这个问题!我被困在这种情况下!感谢关注!