Skip to content
Js Tricks - Javascript, jquery tricks
Menu
  • JAVASCRIPT
  • PHP
  • Yii2
  • WordPress

Category: Javascript

How to use the javascript string replace
Javascript

How to use the javascript string replace

adminJune 23, 2019February 22, 20200
If you are having problems changing a string in the text. We can use the replace() method. What is the …
Read More
How to reload a page using JavaScript?
Javascript

How to reload a page using JavaScript?

adminNovember 17, 2018November 17, 20180
You can use "reload ()" to reload the current document, Or you can also us "location.href"
Read More
Javascript go back to previous page
Javascript

Javascript go back to previous page

adminNovember 17, 2018November 17, 20180
The back() method loads the previous URL in the history list. This is the same as clicking the "Back button" in …
Read More
How to create a confirm dialog yes no with javascript?
Javascript

How to create a confirm dialog yes no with javascript?

adminNovember 17, 2018November 17, 20180
The confirm() method displays a dialog box with a specified message, along with an OK and a Cancel button. The confirm() …
Read More
How to get current url path in javascript?
Javascript

How to get current url path in javascript?

adminNovember 15, 2018November 15, 20180
In javascript, to get the path, you can use: Ex: https://js-tricks.info/check-path-example var pathname = window.location.pathname; // Returns path only : …
Read More
How to redirect to another url in javascript?
Javascript

How to redirect to another url in javascript?

adminNovember 8, 20180
you can set the location of the window. window.location = "http://domain.com/url-name"; The window.location object can be used to get the …
Read More
How to check for undefined in JavaScript?
Javascript

How to check for undefined in JavaScript?

adminNovember 6, 2018November 15, 20180
You can use the typeof operator to check if a value was undefined. if (typeof name === "undefined") { // …
Read More
Javascript empty array check
Javascript

Javascript empty array check

adminNovember 4, 2018November 15, 20180
You want to do the check for is array first. If you do it the other way round, it will …
Read More
Remove last character from string javascript
Javascript

Remove last character from string javascript

adminOctober 14, 2018December 9, 20180
During the work, sometimes we need to delete the last character in the javascript string. So how can that work? …
Read More
Search for

Recent Posts

  • How to get last executed query in Yii2?

    How to get last executed query in Yii2?

    December 15, 2019
  • How to hide the WordPress admin bar

    How to hide the WordPress admin bar

    December 1, 2019
  • How to remove index.php from URL in Yii2

    How to remove index.php from URL in Yii2

    December 1, 2019
  • Yii2 Transaction

    Yii2 Transaction

    December 1, 2019

Popular Posts

    Popular tags

    confirm box in javascript javascript alert yes no javascript confirm box yes no javascript confirm dialog yes no javascript confirm yes no javascript go back to previous page javascript go to url javascript goto url javascript href location javascript location javascript location redirect javascript redirect javascript redirect page javascript redirect to another page javascript string replace javascript window refresh javascript yes no dialog jquery get url js redirect to url php print array as string php random string redirect to another page javascript refresh page using javascript
    © 2019 - Js Tricks. All Rights Reserved.
    RedWaves theme by Themient
    Menu
    Search for
    • JAVASCRIPT
    • PHP
    • Yii2
    • WordPress