我的应用程序有几个JS警报,似乎总是显示页面名称.
的index.html
有没有办法将index.html更改为我的应用程序名称或自定义文本.
例:
My App // Which replaces .index.html
alert("I am an alert box!");
Run Code Online (Sandbox Code Playgroud) 我想将此css元素恢复为默认设置,我无法弄清楚如何覆盖这些列表样式的CSS元素.他们在另一个样式表上,我无法改变,但我正在链接.如果你知道如何,请帮忙.
ol li {
list-style: decimal;
}
ol {
list-style: decimal outside;
}
Run Code Online (Sandbox Code Playgroud) 首先,我不确定我的计算机是否可以处理VirtualBox和Windows 8手机模拟器,因为运行模拟器没有按钮.
是否需要为Windows Phone 8和VirtualBox运行模拟器?
我需要删除所有空的td单元格,我可以用jQuery做到这一点.
<td></td>
if(td == empty){
$("td").remove();
}
Run Code Online (Sandbox Code Playgroud)
我不知道如何写出我想要做的事情.
Chrome版本"32.0.1700.76 m".我如何搜索资源.使用Devtools,我如何在我的所有资源中搜索特定的javaScript,而不知道它在哪个文件中.这个功能曾经用于工作,现在我无法弄清楚如何使用.
出于某种原因,我的ajaxStop代码现在正在触发两次,我需要将其限制为一次.
$('.submit').bind('click', function(e) {
$("#fileupload").ajaxForm({
target: '#status'
}).submit();
$(document).ajaxStop(function() {
var mysrc = $("#status").find('img').attr("src");
$(".empty:first").removeClass("empty").removeClass("ui-state-default").addClass("ui-state").append('<img src="'+mysrc+'" width="45" height="60" class="expand"/>');
});
});
Run Code Online (Sandbox Code Playgroud) 我将我的php导出为jsonp,然后调用加载数据的js文件.
我只得到最后一个数据对象的输出.我想循环遍历操作数据,并将所有输出都转换为<li> data.action </ li>格式.如果有人能帮忙解决这个问题,那么非常感谢你.
JSONP
({
"posts": [{
"action": "go to acting school",
"action": "go to a beach",
"action": "go kyacking",
"action": "go skiing in vermont",
"action": "sleep in a cave",
"action": "dress up as favorite celebrity in public",
"action": "see the cherry blossums in Washington DC",
"action": "watch all the rocky movies",
"action": "go sky diving",
"action": "climb Mount Everest",
"action": "climb K2",
"action": "see or participate in war reenactment",
"action": "spend New Years Eve in …
Run Code Online (Sandbox Code Playgroud) 我试图让所有样式表看起来像:
<link href="style.css?v=1234" rel="stylesheet" type="text/css" />
Run Code Online (Sandbox Code Playgroud)
我遇到的唯一问题是获取当前链接标记,然后将新的随机数应用于当前路径.我认为我应用查找链接的方法是可以的,但获取当前的attr然后应用新的方法是我出错的地方.
$(document).ready(function() {
var randomNum = Math.ceil(Math.random()*2);
// is this the best way?
$("head").find("link").attr("href")+"?v="+randomNum;
// I don't think this works
$('link[rel="stylesheet"]').end()+"?v="+randomNum;
});
Run Code Online (Sandbox Code Playgroud)
我有一群人遇到缓存问题,他们注意到这将是一个可能的解决方案.
我想知道如何在常规浏览器上测试一些视网膜图像css?我也试过我以前的代码而不是下面的代码,并想知道它是否有效?
很难判断正确的图像是否正在加载,因为这是相同的图像质量更好.
//retina stuff
@media all and (-webkit-min-device-pixel-ratio: 1.5) {
#home {
background: url('bg-home-x2.png') no-repeat;
}
.shelf {
background: url('shelf-x2.png') no-repeat top center;
height: 111px;
padding-bottom: 0px;
}
#pantry {
background: url('bg-pantry-x2.png') no-repeat;
width: 320px;
height: 480px;
z-index: -1;
}
#list {
background: url('bg-cart-x2.png') no-repeat;
width: 320px;
height: 480px;
z-index: -1;
margin-top: -6px;
}
}
Run Code Online (Sandbox Code Playgroud) 我有很多项目由del1,del2,del3等定义.
如何将.click设置为.del1 delete(1)和.del2 delete(2)?
<li>
<a href="http://www." target="new">http://www.</a>
<a href="#">
<img class="del1" src="images/page_white_delete.png" title="Delete">
</a>
</li>
<li>
<a href="http://www." target="new">http://www.</a>
<a href="#">
<img class="del2" src="images/page_white_delete.png" title="Delete">
</a>
</li>
Run Code Online (Sandbox Code Playgroud)
jQuery的:
$(".del1").click(function(){
favs.webdb.deleteTodo(1);
});
Run Code Online (Sandbox Code Playgroud)
旧代码是这样编写的:
<li><a href="http://www.tes.com" target="new">http://www.tes.com</a>
<a href="javascript:void(0);" onclick="favs.webdb.deleteTodo(1);">
<img src="images/page_white_delete.png" title="Delete">
</a></li>
Run Code Online (Sandbox Code Playgroud)
我还认为我可能不得不进行jquery实时点击,因为webdb在页面加载完成之前不会加载.
jquery ×5
css ×2
iphone ×2
javascript ×2
ajax ×1
cordova ×1
ios ×1
jsonp ×1
virtualbox ×1
windows-8 ×1