+ 2
The only possible reason i can think of is that sololearn platform runs the JS first before the HTML is loaded, so it is detecting the style being null. So I suggest the following instead:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<div id="Bing">hjw</div>
</body>
<script>
var Bong=document.getElementById("Bing");
Bong.style.height="1px";
</script>
</html>
By putting the script at the bottom (instead of under JS tab), this ensures that the script is run after the HTML is loaded
+ 1
U can try this with quotation mark:
JoeyTribbiani.style.height = "1px";
It should work :)
+ 1
what error did u experience? The result shd be showing you 1px height instead of 456px right away
+ 1
Don't ask me why, but I changed the double quotations to single quotations and I think that I got it to work.
Jo.style.height='1px';