Skip to content

Tag: html

innerHTML disappearing quickly after displaying

I was trying to make a “find and replace” page and my code is working properly except that the resulting string is only displayed for a split second before it disappears and the form is reset Here is the HTML Here is the js Answer You will have to prevent the form from submitting, either by: &#821…

Form being submited when not related button is clicked

In my current project, I have a html form which contain a structure like that: What’s happening is that when I try access the second (or third tab) the form is submitted to the server, before I fil all the fields of the form, persisting incomplete data on the database. the javascript function which shou…

hit function when hits a enemy makes all bullets disapear

Im trying to make a function that when hitting a enemy makes that bullet in the array disappear. Ive tried useing pop, slice, shift but i cant get those to work. the closest thing Ive found is to just make the array empty but it really should be the array -1 or minus that bullet. js fiddle: https://jsfiddle.n…

Not quite hexagon looking border with CSS

Basically I’m trying to get this layout in CSS. I’ve somewhat working modal but I’m finding it hard to get the white box behind the text that is responsive and works for all screen sizes. Answer I have made you an example below using clip path. I personally would look to use an svg, due to b…