0
<html>
<head>
<link href="css.css" rel="Stylesheet" type="text/css"/>
</head>
<body>
<script>
function apresente()
{
var newEl = document.createElement('li');
var newText = document.createTextNode('breno');
newEl.appendChild(newText);
var position = document.getElementsByName('ol')[0];
position.appendChild(newEl);
}
</script>
<form>
<input type="submit" value = "Enviar" onclick="apresente()"/>
</form>
<ol>
<li></li>
</ol>
</body>
</html>
your tag shouldn’t be like this:
<ol name="ol">
? or change the javascript:var position = document.getElementsByTagName('ol')[0];
?– Ricardo Pontual
@Brenoricardo some of the answers presented the solution to your problem?
– Leandro Angelo