解决方案 »

  1.   

    套餐上搞个自定义属性存储价钱就好了。。点击的时候获取自定义属性值<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>
      

  2.   

    输出表单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>
      

  3.   

    不需要用Ajax做  可以做出来?
      

  4.   

    为什么要用ajax呢?没什么必要啊。。除非你为了防止采集数据什么的,给采集者增加难度可以用ajax动态来加载