この関数は私のファイルの 1 つで実行されていますが、他のファイルでは機能していません。すべての名前などを確認しましたが、見つかりませんでした.....
最初のファイルで
<script type="text/javascript" >
function fillDataInCommand()
{
// var abc = document.myApp.getDataForCommand();
var abc ="heelo syed ammar hassan is here";
document.getElementById("commandtextarea").value = abc;
}
</script>
<form id="form1" name="form1" method="post" action="">
<label>
<textarea name="commandtextarea" style="background-color:#CCCCCC" cols="80" rows="20" wrap="off" id="commandtextarea"></textarea>
</label>
</form>
そして他のもので;
document.write ("<div align='center'><textarea name='commandtextarea' style='background-color:#EFEFEF' cols ='70' rows='20' rap='off' id='commandtextarea' readonly='readonly'>abc</textarea></div>");
alert(document.getElementById("commandtextarea").value.toString());