I have two DIV's called DIV1 and DIV2 and DIV1 consists of dynamic content and DIV2 is empty.
(我有两个名为DIV1和DIV2的DIV,DIV1由动态内容组成,DIV2为空。)
I need content of DIV1 to be displayed in DIV2.(我需要在DIV2中显示DIV1的内容。)
How can I do it.(我该怎么做。)
I coded in below manner which is not working.
(我以下面的方式编码,但是没有用。)
Anybody please correct it.(任何人请纠正它。)
<script type="text/javascript">
var MyDiv1 = Document.getElementById('DIV1');
var MyDiv2 = Document.getElementById('Div2');
MyDiv2.innerHTML = MyDiv2;
</script>
<body>
<div id="DIV1">
// Some content goes here.
</div>
<div id="DIV2">
</div>
</body>
ask by lock translate from so