我的 HTML 文档中有以下设置...
<div id="logo"><h2>my top logo</h2></div>
<div id="one"><p>this is the first section with stuff in it</p></div>
<div id="two"><h1>this is the section section with stuff in it</h1></div>
<script>//this script associates to stuff in div id=two</script>
有没有办法告诉 < div id = one >,以这种方式进入 < script > 标签下,它看起来像这样......
<div id="logo"><h2>my top logo</h2></div>
<div id="two"><h1>this is the section section with stuff in it</h1></div>
<script>//this script associates to stuff in div id=two</script>
<div id="one"><p>this is the first section with stuff in it</p></div>
我不能依赖包含所有这些的父 div 元素 id。我只需要依靠你在这里看到的。
谢谢