1、创建一个名称为 option_selected 的html文件

3、添加一个button按钮,在点击事件中加入自定义函数 为my_option_selected添加一p标签,设置id 为 show_option_selected

5、在自定义函数中获取select option对象。用 seleted属性获取 属性,将获取的结果添加到p标签中显示

时间:2024-10-12 12:50:04
1、创建一个名称为 option_selected 的html文件
3、添加一个button按钮,在点击事件中加入自定义函数 为my_option_selected添加一p标签,设置id 为 show_option_selected
5、在自定义函数中获取select option对象。用 seleted属性获取 属性,将获取的结果添加到p标签中显示