<input onkeyup="if(event.keyCode==38) value++;if(event.keyCode==40) value--;" value=0>
解决方案 »
- js 求思路,无限弹!
- 一个费解的js算术题
- 求一个判断输入岁数必须是数字的js代码
- function后的分号
- 请教如何用javascript实现这个页面上的功能,谢谢!
- 很头痛的菜单问题!!!!!!!
- javascript能否直接操作xml,或者通过一定的浏览器端插件?
- 怎样取的td元素位置(top;left),或者td元素的width,谢谢大家了,很重要!!
- 请教javascript高手.一个流览器问题.
- <script type="text/javascript"> function test(){ var a=document.getElementById("
- 為什麼這個對象寫的不對??? 要不到我要結果!
- 急急急,请问一般的网页链接里面的加密的参数是怎么实现的?
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>