关于js的问题,自己实在是不会了,希望大神帮忙 jqueryhtmlphpjsinput 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html><head><title>test</title><meta charset="utf-8" /></head><style>.content{width:100px;height:40px;margin-bottom:5px;border:1px solid #ccc;}input{width:30px;height:30px;float:left;}</style><body><div class="content"><input type="button" name="" value="-" /><input type="button" name="" value="0" /><input type="button" name="" value="+" /></div><div class="content"><input type="button" name="" value="-" /><input type="button" name="" value="0" /><input type="button" name="" value="+" /></div><div class="content"><input type="button" name="" value="-" /><input type="button" name="" value="0" /><input type="button" name="" value="+" /></div><script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.2.min.js"></script><script> var o; $(':button').click(function () { switch (this.value) { case '-': o = $(this).next(); o.val(parseInt(o.val(), 10) - 1); break; case '+': o = $(this).prev(); o.val(parseInt(o.val(), 10) + 1); break; } });</script></body></html> phantomjs如何使用~~ js小问题。菜鸟求解 正则表达式替换文本 关于JQuery 如何使用ajax,对页面中的javascript控件实时修改? 怎么我的windows自带的javascript调试器的调试选项都是灰色的????? 为什么会报错啊?晕 求几条代码 与后台交互的等待时间的动画如何实现 导入sql文件时候,navicat报错 jquery 选择同胞元素 想做一个不符合条件提交按钮时灰色的按不了!
<head>
<title>test</title>
<meta charset="utf-8" />
</head>
<style>
.content{
width:100px;
height:40px;
margin-bottom:5px;
border:1px solid #ccc;
}
input{
width:30px;
height:30px;
float:left;
}
</style>
<body>
<div class="content">
<input type="button" name="" value="-" />
<input type="button" name="" value="0" />
<input type="button" name="" value="+" />
</div><div class="content">
<input type="button" name="" value="-" />
<input type="button" name="" value="0" />
<input type="button" name="" value="+" />
</div>
<div class="content">
<input type="button" name="" value="-" />
<input type="button" name="" value="0" />
<input type="button" name="" value="+" />
</div>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.2.min.js"></script>
<script>
var o;
$(':button').click(function () {
switch (this.value) {
case '-': o = $(this).next(); o.val(parseInt(o.val(), 10) - 1); break;
case '+': o = $(this).prev(); o.val(parseInt(o.val(), 10) + 1); break;
}
});
</script>
</body>
</html>