Found 601 Articles for Front End Scripts

How to get a key/value data set from a HTML form?

Nishtha Thakur
Updated on 25-Jun-2020 06:19:04

727 Views

To get a key/ value data set from a HTML form, use jQuery.Let us say this is our HTML −     For JS −var data = $('form#form1’).serializeArray(); // [{'demo: 'value'}] $.ajax({    data: data });

Render ASP.NET TextBox as HTML5 Input type “Number”

karthikeya Boyini
Updated on 25-Jun-2020 06:07:18

981 Views

To render ASP.NET TextBox as HTML5 input type “Number”, set type="number" directly on the textbox.Let us see an example of ASP.NET TextBox −You can also use the following dynamically created the control −TextBox tb = new TextBox(); tb.Attributes.Add("Type", "number");

How to save HTML5 canvas data to file?

George John
Updated on 27-Jan-2020 07:08:50

416 Views

Use PNGStream to save HTML5 canvas to file.var f = require('fs') , out = f.createWriteStream(__dirname + '/text.png') , stream = canvas.pngStream(); stream.on('data', function(chunk){    out.write(chunk); }); stream.on('end', function(){    console.log(‘PNG Saved successfully!’); });

Does HTML5 allow you to interact with local client files from within a web browser?

Anvi Jain
Updated on 25-Jun-2020 06:09:11

161 Views

No, HTML5 does not allow you to interact with local client files directly. You can use drag and drop or FileSystem API for this.ExampleLet us see an example of drag and drop on a web browser using HTML5 −                    #boxA, #boxB {float:left;padding:10px;margin:10px; -moz-user-select:none;}          #boxA { background-color: #6633FF; width:75px; height:75px; }          #boxB { background-color: #FF6699; width:150px; height:150px; }                      function dragStart(ev) {             ev.dataTransfer.effectAllowed='move';     ... Read More

Which browsers support the HTML5 History API?

Samual Sam
Updated on 27-Jan-2020 07:07:22

140 Views

The WebKit-based browsers and Firefox 4 mainly supports the HTML5 History API. However, now almost every modern browser supports it.Firefox 4+Google ChromeInternet Explorer 10+Safari 5+iOS 4

Setting null values with an HTML