在 clojure 中从 select 获取选项值
getting values of options from select in clojure
我想知道如何编写此 javascript 函数以从 Clojure 函数中的 select 选项获取值。
<select id="namelist">
<option value="1">test1</option>
<option value="2" selected="selected">test2</option>
<option value="3">test3</option>
</select>
我想在 clojurescript 中编写下面的 javascript 函数
var e = document.getElementById("namelist");
var strUser = e.options[e.selectedIndex].text;
谁能告诉我它在clojurescript中对应的代码是什么
成绩单为:
(let [e (js/document.getElementById "namelist")]
(.-text (aget (.-options e) (.-selectedIndex e))))
我想知道如何编写此 javascript 函数以从 Clojure 函数中的 select 选项获取值。
<select id="namelist">
<option value="1">test1</option>
<option value="2" selected="selected">test2</option>
<option value="3">test3</option>
</select>
我想在 clojurescript 中编写下面的 javascript 函数
var e = document.getElementById("namelist");
var strUser = e.options[e.selectedIndex].text;
谁能告诉我它在clojurescript中对应的代码是什么
成绩单为:
(let [e (js/document.getElementById "namelist")]
(.-text (aget (.-options e) (.-selectedIndex e))))