updated folder structure
This commit is contained in:
Executable
+26
@@ -0,0 +1,26 @@
|
||||
<html>
|
||||
<body>
|
||||
<script>
|
||||
function changeAttr(){
|
||||
let el = document.getElementById("shape");
|
||||
el.setAttribute("style", "background-color:red;border:1px solid black");
|
||||
el.setAttribute("id", "new");
|
||||
el.setAttribute("class", "circle");
|
||||
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
div {
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
background-color: yellow;
|
||||
}
|
||||
.circle {
|
||||
border-radius: 50%;
|
||||
}
|
||||
</style>
|
||||
<div id="shape" class="square"></div>
|
||||
|
||||
<button onclick="changeAttr()">Change attributes...</button>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user