我有选项选择(称为selection
)。
当用户更改所选行时,有onchange
以下功能:
<select id="selection" style="width: 276px;" onchange="func(this,'previewBody')">
我有一个javascript代码:
var e = document.getElementById("selection");
if ((e.options[i].text).search("5191") != -1) {
e.selectedIndex = i; // select the row in the option
//func(this, 'previewBody'); // HERE I have to run this function
}
但我应该发送什么?如何创建this
像函数this
的变量onchange
?
任何帮助表示赞赏!