checkbox in listview calling javascript code onchange

In an ASP:ListView control, I have a checkbox for each row. Each row represents a product with a corresponding price. I want the customer to select one or more products and calculate a total price client side. So far, I've used the following code, but it does not work: )" /> I have a javascript function changeTotal(referer, value) which should determine if the product was just selected and add/subtract the product price from a total. The PROBLEM is the javascript function assignment in the CheckBox definition - what is wrong with this approach? Why can't I assign a static price for the javascript function? When I remove the `<%# Eval("Price")) %>` part from the checkbox, the code compiles without errors.

以上就是 checkbox in listview calling javascript code onchange的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准