请教高手,请问有没有既可编辑其中数字又可以按上下箭头增减数字的东西,或者如何实现? <input onkeyup="if(event.keyCode==38) value++;if(event.keyCode==40) value--;" value=0> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script>var timer=null;function check(uid){ var obj=document.all(uid); if(isNaN(obj.value))obj.value=obj.value.slice(0,-1) timer=setTimeout("check('"+uid+"')",10);}function myclear(){ clearTimeout(timer)}function set(i){if(i==1)document.all.mytext.value++;elsedocument.all.mytext.value--;}</script><form name=form1><input name=mytext onfocus=check(this.uniqueID) onblur=myclear()><input type=button value="+" onclick=set(1)><input type=button value="-" onclick=set(0)>输入过程中即时检查文本框</form> <input onkeyup="if(event.keyCode==38) value++;if(event.keyCode==40) value--;"onkeypress="if(event.keyCode<48||event.keyCode>57)return false"> <style>.navPoint {font-family: Webdings;font-size:9px;cursor:hand;height:10px;}</style><table CELLPADDING='0' CELLSPACING='0'><tr><td rowspan=2><input type=text value=0 id="spinner"></td><td><input type=button class="navPoint" value="5" onClick="spinner.value++"></td></tr><tr><td><input type=button class="navPoint" value="6" onClick="spinner.value--"></td></tr></table> 可以了<style>.navPoint {font-family: Webdings;font-size:7px;cursor:hand;height:10px;width:20px;background-color:#C0C0C0;border:1 outset #ffffff;}</style><table CELLPADDING='0' CELLSPACING='0'><tr><td rowspan=2><input type=text value=0 id="spinner"></td><td><input type=button class="navPoint" value="5" onClick="spinner.value++"></td></tr><tr><td><input type=button class="navPoint" value="6" onClick="spinner.value--"></td></tr></table> 使用form和a跳转的区别? 点击iframe里的内容为什么没有弹出 急求!上传图片前JS判断大小的兼容IE8问题 js显示数据库里数据 谁有jquery 的教程 发个地址 谢谢 根据编号,改变title=""里面的值,怎么改 求js操作listbox 关于页面中表单排序显示问题请教? IE5.0中实现对Iframe内容打印最灵活的方法?节前给分 急,请问在JAVSCRIPT里如何将表单里填的数字用逗号三位三位的分开啊? 為什麼這個對象寫的不對??? 要不到我要結果! 急急急,请问一般的网页链接里面的加密的参数是怎么实现的?
var timer=null;
function check(uid)
{
var obj=document.all(uid);
if(isNaN(obj.value))obj.value=obj.value.slice(0,-1)
timer=setTimeout("check('"+uid+"')",10);
}
function myclear(){
clearTimeout(timer)
}
function set(i)
{
if(i==1)
document.all.mytext.value++;
else
document.all.mytext.value--;
}
</script>
<form name=form1>
<input name=mytext onfocus=check(this.uniqueID) onblur=myclear()>
<input type=button value="+" onclick=set(1)>
<input type=button value="-" onclick=set(0)>
输入过程中即时检查文本框
</form>
.navPoint {
font-family: Webdings;
font-size:9px;
cursor:hand;
height:10px;
}
</style><table CELLPADDING='0' CELLSPACING='0'>
<tr>
<td rowspan=2><input type=text value=0 id="spinner"></td>
<td><input type=button class="navPoint" value="5" onClick="spinner.value++"></td>
</tr>
<tr><td><input type=button class="navPoint" value="6" onClick="spinner.value--"></td>
</tr>
</table>
<style>
.navPoint {
font-family: Webdings;
font-size:7px;
cursor:hand;
height:10px;
width:20px;
background-color:#C0C0C0;
border:1 outset #ffffff;
}
</style><table CELLPADDING='0' CELLSPACING='0'>
<tr>
<td rowspan=2><input type=text value=0 id="spinner"></td>
<td><input type=button class="navPoint" value="5" onClick="spinner.value++"></td>
</tr>
<tr><td><input type=button class="navPoint" value="6" onClick="spinner.value--"></td>
</tr>
</table>