I would like the following text to appear as ‘”test test test'” using JavaScript.
<body>
<blockquote>test test test</blockquote>
</body>
I have the following code but it does not work
<blockquote window.onload = function test()> test test test</blockquote>
<script type="text/javascript">
function test(){
var a = document.getElementsByTagName(blockquote).value
return "a";
}
</script>
One of these will work for you:
All blockquotes on the page when all HTML elements are in the DOM:
Example
All blockquotes on the page above the script:
Example
Specific blockquote:
Example