js输入日期这样怎么实现 还不如直接new Date()呢。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 刚给你写了一下.可以用.<script type="text/javascript"> function ss(){ var t = document.all.time.value; if(t.length==4){ document.all.time.value+="-"; } if(t.length==7){ document.all.time.value+="-"; } }</script><input name="time" onkeypress="ss();"> 用键盘事件判断一下<html><head> <script language="javascript"> function chege(){ if(document.forms[0].te.value.length==4){ var techeck=document.forms[0].te; techeck.value+="-"; } } </script> </head><body> <form name="gege"><input type="text" name="te" onkeypress="chege();"></form></body></html> <html><head><meta http-equiv="Content-Type" content="text/html; charset=shift_jis"><title>新しいページ 3</title><script>function show(){ var txt = document.getElementById("value"); if(10<parseInt(txt.value)<2999) { txt.value = txt.value+"-"; }}</script></head><body><input id="value" onchange="show()"></body></html>类似这样的么 结帖率106.25%我也想拥有 axis2嵌入到web中出问题 java开发 远程连接数据库 my sql insert 中文问题??? jsp调用连接池的疑惑 急急如律令,请高手赐教!!!~~~ JSPweb问题 刷新页面,怎样才能让它不按原来的条件提交? 固定ip有多大可能? servlet字符集问题 在tomcat中自己编写数据库连接池管理类 动态网页中文章(不是表)的数据库创建问题
刚给你写了一下.可以用.<script type="text/javascript">
function ss(){
var t = document.all.time.value;
if(t.length==4){
document.all.time.value+="-";
}
if(t.length==7){
document.all.time.value+="-";
}
}
</script>
<input name="time" onkeypress="ss();">
<html>
<head>
<script language="javascript">
function chege(){
if(document.forms[0].te.value.length==4){
var techeck=document.forms[0].te;
techeck.value+="-";
}
}
</script>
</head>
<body>
<form name="gege">
<input type="text" name="te" onkeypress="chege();">
</form>
</body>
</html>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
<title>新しいページ 3</title>
<script>
function show()
{
var txt = document.getElementById("value");
if(10<parseInt(txt.value)<2999)
{
txt.value = txt.value+"-";
}
}
</script>
</head><body>
<input id="value" onchange="show()">
</body></html>
类似这样的么