What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-02-24 19:55:02
how to send json in js with post
// Sending and receiving data in JSON format using POST method // var xhr = new XMLHttpRequest(); var url = "url"; xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/json"); xhr.onreadyst... Add solution -
Javascript 2022-01-30 10:20:39
xhr post
var url = "https://example.com/"; var xhr = new XMLHttpRequest(); xhr.open("POST", url); xhr.setRequestHeader("Content-Type", "application/json"); xhr.onreadystatechange = function () { if (xhr.readyState === ... Add solution -
PHP 2022-01-22 09:45:28
Determine the percentage of the file uploaded to the server using php
$(function() { var bar = $('.bar'); var percent = $('.percent'); var status = $('#status'); $('form').ajaxForm({ beforeSend: function() { status.empty(); var percentVal = '0%'; bar.width(percen... Add solution -
Javascript 2021-11-08 11:53:16
get authorization header javascript in my page
<!DOCTYPE html> <html> <head> </head> <body> <button onclick="tryit();">PDF</button> <script> function tryit() { var win = window.open('_blank'); downloadFile('/pdf', function(b... Add solution -
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