Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/431.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Javascript函数中,如何使用onclick事件编写html上下按钮_Javascript_Html - Fatal编程技术网

在Javascript函数中,如何使用onclick事件编写html上下按钮

在Javascript函数中,如何使用onclick事件编写html上下按钮,javascript,html,Javascript,Html,我是这样写的,但它对我不起作用 '<div class="row" style="margin-right:50px;">' + '<input type="text" id="product" name="Quantity" min="1" value="1" style=width:40px;height:26px;&qu

我是这样写的,但它对我不起作用

   '<div class="row" style="margin-right:50px;">'
    + '<input type="text" id="product" name="Quantity" min="1" value="1" style=width:40px;height:26px;" >'
    + '<div class="si">'
    + '<div class="number-input-button bento-number-input-button-up" value="1"id="product" onClick="product.value = (+product.value+1)"><i class="bento-icon-chevron-up"></i></div>'
    + '<div class="number-input-button number-input-button-down bento-number-input-button-down" value="1" onClick="product.value = (+product.value+1)"><i class="bento-icon-chevron-down"></i> </div></div>'
    + '</div>'
    + '</div>'
“”

+'请单击编辑,然后单击
[]
代码段编辑器,创建一个代码段编辑器,并描述什么“不适合我”