爱问知识人 爱问教育 医院库

用HTML+VBScript制作如图效果的表单。

首页

用HTML+VBScript制作如图效果的表单。


        

提交回答
好评回答
  • 2018-04-04 12:07:53
      我记得我好像回答过这样的问题。。。
      <html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>计算星期几</title></head><body><table width="300" border="0" cellpadding="0" cellspacing="1" bgcolor="#999999"><form name=form1><tr><td width="55%" height="25" align="right" valign="middle" bgcolor="#FFFFFF">请输入年:</td><td width="45%" bgcolor="#FFFFFF">&nbsp;<input onKeyUp="value= place(/[^\d]/g,'')" onBlur="value= place(/[^\d]/g,'')" name="a" type="text" size="4" maxlength="4" /></td></tr><tr><td height="25" align="right" valign="middle" bgcolor="#FFFFFF">请输入月:</td><td bgcolor="#FFFFFF">&nbsp;<input onKeyUp="value= place(/[^\d]/g,'')" onBlur="value= place(/[^\d]/g,'')" name="b" type="text" size="2" maxlength="2" /></td></tr><tr><td height="25" align="right" valign="middle" bgcolor="#FFFFFF">请输入日:</td><td bgcolor="#FFFFFF">&nbsp;<input onKeyUp="value= place(/[^\d]/g,'')" onBlur="value= place(/[^\d]/g,'')" name="c" type="text" size="2" maxlength="2" /></td></tr><tr><td height="25" align="right" valign="middle" bgcolor="#FFFFFF">计算该日期是星期几:</td><td bgcolor="#FFFFFF">&nbsp;<input name="button" type="button" value="计算结果" onclick="shijian()" /></td></tr></form></table><script language="vbscript">sub shijian()if lue="" or lue="" or lue="" thenalert("请输入年、月、日!")exit subend ifif len( lue)<>4 thenalert("年份输入有误!")exit subend ifa1= lueb1= luec1= lueriqi=CDate(a1&"-"&b1&"-"&c1)str=datepart("w",riqi)if str=1 thenstr="星期日"elseif str=2 thenstr="星期一"elseif str=3 thenstr="星期二"elseif str=4 thenstr="星期三"elseif str=5 thenstr="星期四"elseif str=6 thenstr="星期五"elseif str=7 thenstr="星期六"end ifalert(a1+"年"+b1+"月"+c1+"日是:"+str)end sub</script> </body></html> 答案补充好了,我在你单独发给我的问题里回答了~那个肯定没问题了~。

    花***

    2018-04-04 12:07:53

类似问题

换一换

相关推荐

正在加载...
最新问答 推荐信息 热门专题 热点推荐
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200

热点检索

  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
返回
顶部
帮助 意见
反馈

确定举报此问题

举报原因(必选):