What do you want to save?
Add Code snippet
New code examples
-
-
Javascript 2021-09-19 10:54:02
typescript read url parameters
// get all search params (including ?) const queryString = window.location.search; // it will look like this: ?product=shirt&color=blue&newuser&size=m // parse the query string's paramters const urlParams = new URLSearchParams(queryString); ... Add solution -
Javascript 2021-09-15 13:58:05
javascript websocket
var Socket = new WebSocket('ws://' + window.location.hostname + ':81/'); // The '81' here is the Port where the WebSocket server will communicate with // The instance of the WebSocket() class (i.e. Socket here), must need to be globally defined Socket.se... Add solution
Best helpers
Ranking is empty