問題タブ [preset]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - javascript - 変数を使用して ID でオプションを事前選択する方法
ページに selectA と selectB の 2 つの選択フィールドがあります。ここで、リンクをクリックして事前に選択したいと思いますhttp://www.mypage.com/index.html?selectA=a132&selectB=b02#bestellung。javascript を使用して、a132 と b02 のデコードと var idA と var idB への書き込みを管理しています。しかし、これらの var を使用してフィールドの事前選択をトリガーするにはどうすればよいでしょうか? a132 は selectA-option の ID です。b02 は selectB オプションの ID です。
私のコード:
助けてくれてありがとう、ゲオルク