コンテンツへスキップ
メニュー
この質問にフラグが付けられました
5466 ビュー

How to get value from onchange - input?

<tr><td class="o_td_label"><label class="o_form_label" for="o_field_input_254" data-original-title="" title="">GCT</label></td><td style="width: 100%;"><input class="o_field_float o_field_number o_field_widget o_input" name="gct" placeholder="" id="o_field_input_254" type="text"></td></tr>


My JS in XML View

<script type="text/javascript">
                        window.onload = function () {
                            document.getElementsByName("gct")[0].addEventListener('change', doThing);
                            function doThing(){
                                alert('Horray! Someone wrote "' + this.value + '"!');
                            }
                        }
                    </script>

Thanks




アバター
破棄
関連投稿 返信 ビュー 活動
1
5月 18
7008
0
1月 19
2998
1
1月 19
3569
1
1月 19
2656
0
7月 25
313