<!DOCTYPE html><html><head lang="en"> <meta charset="UTF-8"> <title></title> <link href="" rel="stylesheet" type="text/css"> <script type="text/javascript"> function dada( evt ){ var obj = event.target; var s = obj.value; obj.value = parseFloat(s) + 1; } </script></head><body><input type="button" value="1" id="btn1" onclick="dada(event)"/><input type="button" value="1" id="btn2" onclick="dada(event)" /><input type="button" value="1" id="btn3" onclick="dada(event)"/></body></html> ________________________________________this
<!DOCTYPE html><html><head lang="en"> <meta charset="UTF-8"> <title></title> <link href="" rel="stylesheet" type="text/css"> <script type="text/javascript"> function dada( myInput ){ myInput.value = parseFloat(myInput.value) + 1; } </script></head><body><input type="button" value="1" id="btn1" onclick="dada(this)"/><input type="button" value="1" id="btn2" onclick="dada(this)" /><input type="button" value="1" id="btn3" onclick="dada(this)"/></body></html>
时间: 2024-10-01 09:46:59