Skip to content
  • About Us
  • Contact Us
  • Privacy Policy
  • Terms and Conditions

Programming Tutorial

Start Learning to Code

  • About Us
  • Contact Us
  • Privacy Policy
  • Terms and Conditions

Breaking News

Nextjs: running code after complete fetch

why does 400 status code result always entercatch block execution with axios?

Saving the state of the button onClick

TypeScript: Specify that value must be in Array using spread operator

Show separate number with comma in django tempalte

Why does my website keep showing old index.html, style.css, app.js…?

Using Python Flask to change the colour of an icon when it detects a words like scam, pending and verified

x clear icon appears only when the input has value – react

Login button redirects to two pages. For first time loginers, it redirects to agreement page, and for rest, it redirects straight to home?

WebComponent setter not triggered if defer is used

Category: Javascript

JavaScript Questions and Answers

Javascript

Elements order in a “for (… in …)” loop

admin November 11, 2008

Does the “for…in” loop in Javascript loop through the hashtables/elements in the order they are declared? Is there a browser which doesn’t do it in order? The object I wish to use will be declared …

Javascript

Why does parseInt yield NaN with Array#map?

admin November 4, 2008

From the Mozilla Developer Network: [1,4,9].map(Math.sqrt) will yield: [1,2,3] Why then does this: [‘1′,’2′,’3’].map(parseInt) yield this: [1, NaN, NaN] I have tested in Firefox 3.0.1 and …

Javascript

Get an array of list element contents in jQuery

admin October 29, 2008

I have a structure like this:

  • text1
  • text2
  • text3

How do I use javascript or jQuery to get the text as an …

Javascript

Testing the type of a DOM element in JavaScript

admin October 8, 2008

Is there a way to test the type of an element in JavaScript? The answer may or may not require the prototype library, however the following setup does make use of the library. function(event) { …

Javascript

Best way to detect when a user leaves a web page?

admin September 29, 2008

What is the best way to detect if a user leaves a web page? The onunload JavaScript event doesn’t work every time (the HTTP request takes longer than the time required to terminate the browser). …

Javascript

Can an element’s CSS class be set via JavaScript?

admin September 21, 2008

I want to do this: e.className = t; Where t is the name of a style I have defined in a stylesheet.

Javascript

How do you launch the JavaScript debugger in Google Chrome?

admin September 15, 2008

When using Google Chrome, I want to debug some JavaScript code. How can I do that?

Javascript

What is the best method to reduce the size of my Javascript and CSS files?

admin September 15, 2008

When working with large and/or many Javascript and CSS files, what’s the best way to reduce the file sizes?

Posts navigation

Previous 1 … 431 432
Privacy Policy