日期减去天数等于第二个日期 <script. language=Javascript> function cc(dd,dadd) { //可以加上错误处理 var a = new Date(dd) a = a.valueOf() a = a - dadd * 24 * 60 * 60 * 1000 a = new Date(a) alert(a.getFullYear() + "年" + (a.getMonth() +1) + "月" + a.getDate() + "日") } cc("12/23/2002",2) </script>
选择了哪一个Radio <HTML><script. language="vbscript"> function checkme() for each ob in radio1 if ob.checked then window.alert ob.value next end function </script><BODY> <INPUT name="radio1" type="radio"value="style" checked>Style. <INPUT name="radio1" type="radio"value="barcode">Barcode <INPUT type="button" value="check"nclick="checkme()"> </BODY></HTML>