更改具有类名“test”的第一个元素的文本。
<p class="test"></p>
<p class="test"></p>
<script>
@(52) = "Hello";
</script>
<p class="test"></p>
<p class="test"></p>
<script>
document.getElementsByClassName("test")[0].innerHTML = "Hello";
</script>
<p class="test"></p>
<p class="test"></p>
<script>
document.getElementsByClassName("test")[0].innerText = "Hello";
</script>
<p class="test"></p>
<p class="test"></p>
<script>
document.getElementsByClassName('test')[0].innerHTML = "Hello";
</script>
<p class="test"></p>
<p class="test"></p>
<script>
document.getElementsByClassName('test')[0].innerText = "Hello";
</script>