-2
這真的很奇怪,但在「textarea10t0」結尾處有一個0使得它在您設置嘗試設置textarea的行時不起作用。從字面上看,將結局改爲其他任何東西,它就會起作用。我瘋了嗎?textarea10t0令人不安的奇怪的ID不起作用
$textareaID = "textarea10t1";
<textarea id = '$textareaID' placeholder = 'Type something' onkeydown = \"test('editNotifyCommentSecond.php','{$outputID}', '{$textareaID}')\">$notifyComment</textarea>
<script>
//code
document.getElementById("textarea10t0").rows = 50;
</script>
看起來像一個js問題不是php一個 –
PHP開放/關閉標記在哪裏? – chris85
你是否將該元素設置爲0? –