What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-07 23:56:04
download audio file javascript
var filename = url.substring(url.lastIndexOf("/") + 1).split("?")[0]; var xhr = new XMLHttpRequest(); xhr.responseType = 'blob'; xhr.onload = function() { var a = document.createElement('a'); a.href = window.URL.createObj... Add solution -
Javascript 2021-10-07 08:17:02
javascript extract json from string
function extractJSON(str) { var firstOpen, firstClose, candidate; firstOpen = str.indexOf('{', firstOpen + 1); do { firstClose = str.lastIndexOf('}'); console.log('firstOpen: ' + firstOpen, 'firstClose: ' + firstClose); ... Add solution -
C# 2021-10-03 03:38:05
c# IndexOf
// To find the index of the first substring in a string use // 'IndexOf()' string str = "Hello World!" str.IndexOf("o"); // Output: 4 // You can give a starting index and a length to search at str.IndexOf("o", 6, 4); // Outp... Add solution -
Javascript 2021-10-01 11:15:03
js get browser name and platform
var nVer = navigator.appVersion; var nAgt = navigator.userAgent; var browserName = navigator.appName; var fullVersion = ''+parseFloat(navigator.appVersion); var majorVersion = parseInt(navigator.appVersion,10); var nameOffset,verOffset,ix; // In Opera... Add solution -
Javascript 2021-09-25 12:03:03
lastindexof js
string.lastIndexOf(searchValue[, fromIndex]) Add solution -
Javascript 2021-09-25 09:06:03
get file extension file upload control in javascript
function getFile(filePath) { return filePath.substr(filePath.lastIndexOf('\\') + 1).split('.')[0]; } function getoutput() { outputfile.value = getFile(inputfile.value); extension.value = inputfile.value.split('.')[1]; } Add solution