609854 发表于 2012-10-17 11:05

IE可以运行,firfox 和 chrome运行不了,请大虾帮助

本帖最后由 609854 于 2012-10-17 11:06 编辑

<script language="javascript">
<!--
function formaction()
{ alert("fuck");
    selectObj = document.getElementById("friendlink");
    //alert();
    if(selectObj.options.value!=''){
    //alert(selectObj.options.value);
    //window.open(selectObj.options.value);
    document.getElementById("friendlinkform").action=selectObj.options.value;
    friendlinkform.submit();
    }
}
-->
</script>
<form action="" target="_blank" id="friendlinkform" name="friendlinkform">
</form>
<select name="friendlink" onChange="javascript:formaction();">
<option>Choose Here</option>
<option value="Solutions/car.htm"><a href="Solutions/car.htm" target="_blank">car</a></option>
</select>IE可以运行,firfox 和 chrome运行不了,请大虾帮助,非常感谢

chenlinbo5588 发表于 2012-10-17 15:37

首先 将onChange 改为 onchange 再说
页: [1]
查看完整版本: IE可以运行,firfox 和 chrome运行不了,请大虾帮助