IE9で、エラーMicrosoft JScriptランタイムエラーが発生します:'populatedropdown'が行に定義されていません<input type="button"....
リテラル値を正しくエスケープしていないと思います。どのように変更すればよいですか?
<html>
<head>
<title>Add items to dropdown</title>
<script type="text/javascript">
function populatedropdown(var devicelist) {
var devList = document.frm.optdevices;
var arrDev = split(devicelist, ";");
devList.options.length = 0; // this removes existing options
for (var i = 0; i <= 3; i++) {
var option = new Option(arrDev[i],i);
devList.options[i] = option;
}
}
</script>
</head>
<body>
<form name="frm">
<select name="optdevices">
</select>
<input type="button" value="TestAdd" onclick="populatedropdown('201;202;203;')" />
</form>
</body>
</html>