+ 1
Can your please alter the Code?
In the following program, I've used id selector (box), but I want to use class selector. Please alter the code written in this code without altering the output. https://code.sololearn.com/WGPXTrVJ7fz0/?ref=app
7 Respostas
+ 4
<!DOCTYPE html>
<html>
<head>
<title>MyBoxIsMyBoxNoneOfYourBox!</title>
<style>
/* Here will your CSS code */
</style>
</head>
<body>
<div class="box" onclick='itsMe()'>TAP ON ME!</div>
<script>
// Here will be your JS code (as mentioned by @Calvin)
</script>
</body>
</html>
+ 2
It works on Chrome too.
+ 1
Thanks Calviղ , but this is what I exactly did with Google Chrome, but it doesn't works though. So I got confused with the concepts, therefore asked for it.
So what to do with it to work as fine on Chrome?
+ 1
Calviղ
No, I mean not on Sololearn website, but offline, with notepad
0
<!DOCTYPE html>
<html>
<head>
<title>MyBoxIsMyBoxNoneOfYourBox!</title>
<style>
#box{
width: 200px;
background: red;
color: white;
margin: auto;
text-align: center;
padding: 50px 0;
font: bold 20px cambria;
}
</style>
</head>
<body>
<div id="box" onclick='itsMe()'>TAP ON ME!</div>
</body>
</html>
0
Re: "No, I mean not on Sololearn website, but offline, with notepad"
Hi Çůřîöş ßąšäñț 🇮🇳,
Not sure if this would help answer your question, but maybe try:
https://code.sololearn.com/W326FKwAKXtN