Skip to main content

Print Values of New FormData()

Print Values of New FormData() 

//js code for print FromData() values var formData = new FormData();
formData.append('key_one', 'First value');
formData.append('key_two', 'Second value');
formData.append('key_three', 'Thrid value');
// Log the key/value pairs
for (var pair of formData.entries()) {
console.log(pair[0]+ ' - ' + pair[1]);
} output :
key_one - First value
key_two - Second value
key_three - Thrid value full link : https://codepulse.blog/howto-display-formdata-values/

Comments

Popular posts from this blog

PHP SPARESHEET CODE

PHP SPARESHEET CODE <?php namespace App\Http\Controllers; require 'vendor/autoload.php'; use DB; use File; use Session; use Helper; use DateTime; use DateInterval; use DatePeriod; use App\AdminAuth; use App\SalaryLog; use App\TimeLog; use App\Project; use Illuminate\Support\Str; use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Support\Facades\URL; use Illuminate\Support\Facades\Storage; use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\IOFactory; use PhpOffice\PhpSpreadsheet\Writer\Xlsx; use PhpOffice\PhpSpreadsheet\Style\NumberFormat; \PhpOffice\PhpSpreadsheet\Cell\Cell::setValueBinder( new \PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder() ); class ExcelController extends Controller {     public function index()     {         return view('Report.report');     }     public function create_report()     {         $row_cnt=2;       ...

Bigcommerce GraphQL API Execute code

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script type="text/javascript"> $(function(){     $( ".cart-item-name__label" ).each(function() {          product_id=$(this).data('prodid'); //graphQL code           var query = `query SeveralProductsByID {                   site {                     products(entityIds: [${product_id}]) {                       edges {                         node {                           name                           description                 ...