Gets the Unix timestamp from a Date object. Use Date.prototype.getTime() to get the timestamp in milliseconds and divide by 1000 to get the timestamp in seconds. Use Math.floor() to appropriately round the resulting timestamp to an integer. Omit the argument, date, to use the current date. Source https://www.30secondsofcode.org/js/s/get-timestamp
| CARVIEW |
Select Language
HTTP/2 301
date: Thu, 22 Jan 2026 11:40:33 GMT
content-type: text/html; charset=UTF-8
location: https://javascriptsource.com/page/8/
x-fw-version: 5.0.0
x-fw-server: Flywheel/5.1.0
x-xss-protection: 1
x-redirect-by: WordPress
x-content-type-options: nosniff
x-fw-dynamic: TRUE
x-fw-hash: x4u4abmr3y
referrer-policy: no-referrer-when-downgrade
server: cloudflare
accept-ranges: bytes
x-served-by: cache-bom-vanm7210082-BOM, cache-bom-vanm7210077-BOM
x-cache: MISS, MISS
x-cache-hits: 0, 0
x-timer: S1769082032.125870,VS0,VE1027
x-fw-serve: TRUE
x-fw-static: NO
x-fw-type: VISIT
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=kuF%2FDsDPN%2BABKmK0Y1yrH5BM4w1CsMIMMUwyetbzdf%2Bwn2NMQ1OJ07Dc10Q5%2BgA6f4EIZZh%2F4B433%2BwzD7GqTZy8Ezd%2FBbWFrIOOi%2FO6NcaO1jHc"}]}
cf-ray: 9c1ec6ec8e49ff66-BOM
alt-svc: h3=":443"; ma=86400
HTTP/2 200
date: Thu, 22 Jan 2026 11:40:34 GMT
content-type: text/html; charset=UTF-8
x-fw-version: 5.0.0
x-xss-protection: 1
x-fw-server: Flywheel/5.1.0
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=zJ3lcctY3eyHxDQgQndKrcdMsCkkjMIkNaMDqyzf%2BUOS5C7GAUAzAzbETxvA27B1KzNQzV%2FqgKonHlPGHf1HzNuM8g2vUnBSxmnskeHr0uEJgQuB"}]}
link: ; rel="https://api.w.org/"
x-content-type-options: nosniff
x-fw-hash: x4u4abmr3y
x-fw-dynamic: TRUE
referrer-policy: no-referrer-when-downgrade
server: cloudflare
x-cacheable: YES
fastly-restarts: 1
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
x-served-by: cache-bom-vanm7210033-BOM, cache-bom-vanm7210077-BOM
x-cache: MISS, MISS
x-cache-hits: 0, 0
x-timer: S1769082033.171823,VS0,VE1026
vary: Accept-Encoding
x-fw-serve: TRUE
x-fw-static: NO
x-fw-type: VISIT
cf-cache-status: DYNAMIC
content-encoding: gzip
cf-ray: 9c1ec6f32e99ff66-BOM
alt-svc: h3=":443"; ma=86400
JavaScriptSource - Page 8 of 36 - Search 5,000+ Free JavaScript Snippets


Preventing paste into an input field
Get and set the text of an element (without markup)
Range generator

Creates a generator, that generates all values in the given range using the given step. Use a while loop to iterate from start to end, using yield to return each value and then incrementing by step. Omit the third argument, step, to use a default value of 1. Source https://www.30secondsofcode.org/js/s/range-generator
Notify when element size is changed
Get and set HTML content for an element
Check if a node is in the viewport
Remove an item from an object
Return an array of elements that appear in both arrays
Check if a string is a valid JSON

This is useful for making sure that the JSON is valid before you perform another operation on it. You can learn more about how to use json parse on WebReference. While working, this json formatter and validator is a handy tool. Source https://github.com/roeib/JavaScript-snippets#check-if-a-string-is-a-valid-json
- « Go to Previous Page
- Go to page 1
- Interim pages omitted …
- Go to page 6
- Go to page 7
- Go to page 8
- Go to page 9
- Go to page 10
- Interim pages omitted …
- Go to page 36
- Go to Next Page »








