标签:style blog http java color get
select 移除某一 option 的 javascript 公司用的代码是
var ddlPrimaryResource = document.getElementById(ddlPrimaryResourceID); ddlPrimaryResource.options[ddlPrimaryResource.selectedIndex].remove();
这段代码在 chrome 里执行OK ,但是在 safari 里却报错了
TypeError: ‘undefined‘ is not a function (evaluating ‘ddlPrimaryResource.options[ddlPrimaryResource.selectedIndex].remove()‘)
google 了一下改成
var ddlPrimaryResource = document.getElementById(ddlPrimaryResourceID); ddlPrimaryResource.removeChild(ddlPrimaryResource.options[ddlPrimaryResource.selectedIndex]);
引用:http://www.dyn-web.com/tutorials/forms/select/option/
google 访问不了的可以用这个地址:https://s3-us-west-1.amazonaws.com/google3/index.html
select remove option safari 兼容,布布扣,bubuko.com
select remove option safari 兼容
标签:style blog http java color get
原文地址:http://www.cnblogs.com/cg6811568/p/3793944.html