我得到了以下工作代码:
Aumentar un <input id="porcentaje">%
<input type="button" id="aumentar" value="Aumentar" onclick="calcular()">
<br>Monto: <input id="campo">
<br> If you insert a number into the "campo" input it shoul
第11行不会调用'l‘作为值。如果我将值直接放在JS中,它就会起作用... $(function() {
$('#calculate').on('click', function() {
var b = parseInt($('#b').val().trim()),
l = parseInt($('#l').val().trim()),
m = parseInt($('#m').val().trim()),
p = parseInt($('#p&
不返回表单字段值
var formJSON = $.toJSON($('#form1'));
JSP是:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.
HTML
<div>my content of the div1
<input/>
</div>
<div>my content of the div2
<input/>
</div>
<div>my content of the div3
<input/>
</div>
JS
$('input').on('change',function(){
var x = $('this').parent('div&