开发者

Changing items value via onclick isn't working

开发者 https://www.devze.com 2023-02-06 00:53 出处:网络
Could anyone tell me why the below code isn\'t working? <input type=\"hidd开发者_如何学Pythonen\" name=\"way\" mode=\"way\" value=\"\" />

Could anyone tell me why the below code isn't working?

<input type="hidd开发者_如何学Pythonen" name="way" mode="way" value="" />

<input type="button" name="finish" value="Update & Finish" onclick="document.getElementById('way').value='continue'; document.edit_list.submit();" />

I get the error:

Error: document.getElementById("way") is null


name and id are different attributes. Your input doesn't have an id defined.


The element with the name property of "way" also needs an id property.

<input type="hidden" name="way" mode="way" id="way" value="" />
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号