1
The function does not let you pass the "Mark" as value because of the use of quotation marks, any idea how I can solve (without removing the quotation marks)? Code :
<<!DOCTYPE html>
<html>
<head>
<title></title>
<script>
function muda(x){
document.getElementById('campo').innerHTML = x;
}
</script>
</head>
<body>
<button onclick="muda('\"Marco\"')">Clicar</button>
<div id="campo" style="width: 100px; height: 100px; background-color: green;"> Oá</div>
</body>
</html>
The thing about
"
solved your problem?– Sam
yes solved the problem
– Marco Silva