1
我環顧四周,看到其他人在使用firefox的innerHTML時遇到了問題,但我無法找到解決方案。這是非常簡單的JS,並且在IE中運行良好,但不會將表單元素outcome1提交到Firefox的下一頁。任何Firefox的幫助表示讚賞。 謝謝! 傑拉德innerHTML不會在Firefox中添加表單元素
<?xml version="1.0" encoding="UTF-8"?>
<!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>
<title>Page Title</title>
<script type="text/javascript" language="JavaScript">
function addInput1(){
var x = document.getElementById("Input1");
x.innerHTML += "<textarea cols=\'20\' rows=\'3\' name=\'Outcome1\'></textarea><br/>";
}
</script>
</head>
<body>
<table cellspacing="0" cellpadding="2">
<form action="admin/AddNew.cfm" method="post">
<tr>
<td valign="top" class="center">
<input type="button" value="+" onmousedown="addInput1();" />
<div align="center" id="Input1"></div>
</td>
</tr>
<tr>
<td>
<input type="submit" name="Submit" value="Submit">
</td>
</tr>
</form>
</table>
</body>
</html>
它的工作原理,但FF不提交的價值。 – neohope
謝謝@neohope。對不起,作爲一個笨蛋,但仍不知道如何解決它。你能握住我的手,並顯示你使用的代碼嗎? – user1371409
您修復了@neohope。謝謝!完美的作品。 – user1371409