一段js代,感判件使真。
系是2007年5月10日。
函依回行到alert( "123 ")。
感if (showMonth=1)是true.
var lastDate = new Date();
//var teshu date
var showMonth=lastDate.getMonth() + 1
alert( "showMonth= " + showMonth)
alert(lastDate.getMonth())
if (showMonth=1)
{
alert( "123 ")
lastDate.setYear(lastDate.getYear() - 1)
lastDate.setMonth(11)
}
else
{
alert( "ddd ")
lastDate.setMonth(lastDate.getMonth())
}
[解决办法]
if (showMonth=1) ==> if (showMonth == 1)
[解决办法]
showMonth=1
改成
showMonth==1