firefox下如何取得select的name值 selectfirefox 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 试试这两个this.options[this.selectedIndex].getAttribute('name')或this.options[this.selectedIndex].attributes['name'].value <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title><script type="text/javascript">window.onload=function(){ document.getElementsByTagName('select')[0].onchange=function(){ alert(this[this.selectedIndex].getAttribute('name')); }}</script></head><body><select name="客户名称"><option name=1 value=北京>北京</option><option name=2 value=深圳>深圳</option></select></body></html> 急!!!求解!!! 大幅卷屏广告JS代码 广告图片帮忙图片价格超连接 xtree问题 关于W3CSCHOOL xml 例题的问题 javascript生成input框的按钮添加事件问题 用js来选择radiogroup中的一个按钮 大侠们,急救啊,快来帮帮我!!!!! 请问什么是w3c规定的文字,如何check javascript 字符串转化位整数 什么方法 怎样实现在IE下的模态窗口? 如何让浏览器滚动条不能滚动? ExtJs TriggerField 鼠标移入移出!
this.options[this.selectedIndex].getAttribute('name')
或
this.options[this.selectedIndex].attributes['name'].value
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
window.onload=function(){
document.getElementsByTagName('select')[0].onchange=function(){
alert(this[this.selectedIndex].getAttribute('name'));
}
}
</script>
</head><body>
<select name="客户名称">
<option name=1 value=北京>北京</option>
<option name=2 value=深圳>深圳</option>
</select>
</body>
</html>