click,return问题
html:<input name="button" type="button" value="点击提交" id="button" onclick="Sum()"/>
script: function Sum() {
var numa, numb, sum;
numa = 6;
numb = 8;
sum = numa + numb;
return sum}
请问这里换成return以后,点击了click事件,没有任何反应呢
html:<input name="button" type="button" value="点击提交" id="button" onclick="Sum()"/>
script: function Sum() {
var numa, numb, sum;
numa = 6;
numb = 8;
sum = numa + numb;
return sum}
请问这里换成return以后,点击了click事件,没有任何反应呢
2018-01-23
举报