怎么实现淘宝上点击不同的套餐 局部刷新价格的效果 大神给个思路 ajaxjavascriptjquery 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 套餐上搞个自定义属性存储价钱就好了。。点击的时候获取自定义属性值<script> function setPrice(o) { alert(o.getAttribute('price')) }</script></head><label price="50" onclick="setPrice(this)">套餐1</label> <label price="100" onclick="setPrice(this)">套餐2</label> <label price="150" onclick="setPrice(this)">套餐3</label> 输出表单output<br /> <form action="" method="post" oninput="result.value=parseInt(no1.value)+parseInt(no2.value)"> <input type="number" name="no1" value="" /> <input type="number" name="no2" value="" /> <output name="result"></output> </form> 不需要用Ajax做 可以做出来? 为什么要用ajax呢?没什么必要啊。。除非你为了防止采集数据什么的,给采集者增加难度可以用ajax动态来加载 实现同一个class的文本框值相加 一个下拉菜单的JS问题 用js取得网页高度的问题 javascript操作cookie的问题 如何在javascript里更改调用的函数? javascript怎么访问USB口????????? 请问:带有图片的计数器是如何制作的 关于一个正则表达式 大家快帮帮忙,急!!分不够可以再加 请问,如何把下面的vbsript转变为javascript? 为什么在绑定匿名的时候,会无法删除呢 谁能给一个事件对列的例子啊
function setPrice(o) {
alert(o.getAttribute('price'))
}
</script>
</head>
<label price="50" onclick="setPrice(this)">套餐1</label> <label price="100" onclick="setPrice(this)">套餐2</label> <label price="150" onclick="setPrice(this)">套餐3</label>
<form action="" method="post" oninput="result.value=parseInt(no1.value)+parseInt(no2.value)">
<input type="number" name="no1" value="" />
<input type="number" name="no2" value="" />
<output name="result"></output>
</form>