What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-29 13:39:02
Function that replaces character and allow only numbers into the textbox
This technique we can use on the onkeyup property of HTML element <input type="text" id="txtMobileNo" onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" Add solution -
Other 2021-09-25 22:24:02
mapbox data markers
// add markers to map geojson.features.forEach(function(marker) { // create a HTML element for each feature var el = document.createElement('div'); el.className = 'marker'; // make a marker for each feature and add to the map new mapboxgl.Mark... Add solution -
Other 2021-09-17 19:27:05
css stacking context
in CSS/HTML, A stacking context is a 3D conceptualisation of an element. This can be a root stacking context, as created by the html element. Or it can be a local stacking context, as created by specific properties and values. Rules: What creates a st... Add solution -
CSS 2021-09-15 19:41:02
css block
/******************* BASIC BLOCK POSITIONING **********************/ /******************** Static Position *************************/ /*All elements are static in their position by default. Which means that, all elements are organized just like they wo... Add solution -
Javascript 2021-09-10 10:00:02
javascript get children
// React-Javascript // Pass the children as either wrapping a html element around another // element. import React from 'react' class wrapEle extends React.Component { render() { return ( <div> // the "this" refers to the class... Add solution -
CSS 2021-09-10 03:29:02
em css
'em' units for the font-size property will be relative to the'font-size of the parent element'. 'em' units on other properties other than font-size will be relative to the font-size of the current element. 'rem' units sizes will always be relative to the... Add solution -
Html 2021-09-09 01:38:02
difference between tag and element
HTML tag is just opening or closing entity. For example: <p> and </p> are called HTML tags HTML element encompasses opening tag, closing tag, content (optional for content-less tags) Eg: <p>This is the content</p> : This complet... Add solution -
Html 2021-09-06 19:50:04
how to display an array in html
<p id="display-array"></p> <script type="text/javascript"> // array to be displayed var array = [1, 2, 3, 4, 5]; // access the textContent of the HTML element and set it to the // value of the array seperated ... Add solution