复制代码 代码如下:
<!DOCTYPE html>
<html>
<head>
<title>select.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<>
</head>
<body>
<select id = "myCourse" onchange = "getCourse();">
<option value = "" selected>--请选择一门课程--</option>
</select>
<textarea id = "myares" rows="10" cols="30"></textarea>
<script type="text/javascript" type = "text/javascript">
<>
</script>
</body>
</html>
【动态添加option及createElement使用示例】相关文章:
★ JavaScript中反正弦函数Math.asin()的使用简介
★ 微信浏览器内置JavaScript对象WeixinJSBridge使用实例
★ 在JavaScript中处理字符串之link()方法的使用
★ javascript中createElement的两种创建方式