这个脚本有什么问题?
当我设置我的时钟说29/04/2011它在本周输入中添加36/4/2011!但正确的日期应该是6/5/2011
var d = new Date();
var curr_date = d.getDate();
var tomo_date = d.getDate()+1;
var seven_date = d.getDate()+7;
var curr_month = d.getMonth();
curr_month++;
var curr_year = d.getFullYear();
var tomorrowsDate =(tomo_date + "/" + curr_month + "/" + curr_year);
var weekDate =(seven_date + "/" + curr_month + "/" + curr_year);
{
jQuery("input[id*='tomorrow']").val(tomorrowsDate);
jQuery("input[id*='week']").val(weekDate);
}
Run Code Online (Sandbox Code Playgroud) 我正在为一家公司开发一个响应式网站,其中全尺寸网站有一个幻灯片,背景中有图像(完全用Backstretch填充屏幕).由于图像的大小非常大(大约300k),我正在寻找一种方法来阻止在智能手机上查看网站时加载图像.
我申请display: none
,并visibility: hidden
与媒体查询直道股利.它隐藏了图像,但似乎仍在下载.是否有一种聪明的方法可以让浏览器完全忽略它们?