skip to Main Content

Upload file from form with Jquery

I have this form: <input type="file" name="CAR_Logo"> <button data-action="save" data-name="Africa">Save</> How I can update my code to be able to upload the file ? This is what I have tried: $('[data-action="save"]').click(function(e) { e.preventDefault(); CAR_Name = $(this).data('name'); CAR_Logo = $(this).val('CAR_Logo'); });

VIEW QUESTION

How to use variables in inline HTML Style tag – Jquery

I am trying to get the "left" and "top" attributes to be set to the value gotten from "randomXValue" and "randomYValue" the two functions return integers. randomXValue = getRandomXValue(); randomYValue = getRandomYValue(); $("#gamespace").append( '<img src="img/img.jpg" class="gameimg" style = "left: (randomXValue)px;…

VIEW QUESTION
Back To Top
Search