Found 598 Articles for Front End Scripts

Use of Ionic as desktop web application with HTML5

Arjun Thakur
Updated on 30-Jul-2019 22:30:22

248 Views

Ionic is an HTML5 Mobile App Development Framework targeted at building hybrid mobile apps. Think of Ionic as the front-end UI framework that handles all the look and feel and UI interactions your app needs to be compelling. Kind of like "Bootstrap for Native", but with the support for a broad range of common native mobile components, slick animations and a beautiful design. Ionic framework needs native wrapper to be able to run on mobile devicesIonic is built and tested for mobile only. Internet Explorer does not support all the features of Ionic. Use separate applications for desktop and mobile. However, you ... Read More

addEventListener for keydown on HTML5 Canvas

Nitya Raut
Updated on 24-Jun-2020 14:23:57

809 Views

Use the tabindex attribute on the canvas element for addEventListener on Canvas −var myTarget, myCanvas; window.onload = function() {    myCanvas = document.getElementById('canvas');    document.addEventListener('mousedown', function(event) {       myTarget = event.target;       alert('This is mousedown event.');    }, false);        document.addEventListener('keydown', function(event) {       if(myTarget == myCanvas) {          alert('This is keydown event.');       }    }, false); }

Ember.js browser support with HTML

Jennifer Nicholas
Updated on 24-Jun-2020 14:24:36

186 Views

Ember.js is an open-source, free JavaScript client-side framework used for developing web applications.It allows building client-side JavaScript applications by providing a complete solution which contains datamanagement and application flow.It uses the MVC(Model-View-Controller) architecture pattern. In Ember.js, the route is used as a model,handlebar template as view and controller manipulates the data in the model.The following browsers are supported for Ember −Internet ExplorerMicrosoft EdgeSafari

Center Triangle at Bottom of Div in HTML with CSS

Vrundesha Joshi
Updated on 24-Jun-2020 14:25:53

900 Views

To set the triangle at the center and at the bottom of div, use the following. You need to set left to 50% −.demo: after {    position: absolute;    border-top: solid 50px #e15915;    border-left: solid 50px transparent;    border-right: solid 50px transparent;    top: 100%;    left: 50%;    margin-left: -50px;    width: 0;    height: 0; }

The:last-child selector not working as expected in HTML5

Ankith Reddy
Updated on 24-Jun-2020 14:25:23

433 Views

The last-child selector is used to select the last child element of a parent. It cannot be used to select the last child element with a specific class under a given parent element.Style the last child li element with background-color −li:last-child{    background-color: blue; }It creates issues if the element is not the very last element.Let us see an example of −If your selector is a:last-child, this works −        This will be selected

Facing Problem in retrieving HTML5 video duration

Chandu yadav
Updated on 24-Jun-2020 14:17:58

455 Views

To get the video duration, query the readyState attribute. It has a series from 0 to 4. When the metadata has loaded, the value you will get is 1.Therefore, you need to do something like −window.setInterval(function(tm) {    // Using readyState attriute    if (video.readyState > 0) {       var duration = $('#duration').get(0);       // for video duration       var video_duration = Math.round(video.duration);       duration.firstChild.nodeValue = video_duration;       clearInterval(tm);    } },1000);

Any way of using frames in HTML5?

Rishi Rathor
Updated on 27-Jan-2020 06:13:43

223 Views

The frameset attribute deprecated in HTML, but you can still use it. The top-level parent doc now usesExampleXHTML and the frame uses HTML5.                            

What is the usage of the cross-origin attribute in HTML5?

Arjun Thakur
Updated on 24-Jun-2020 14:18:46

286 Views

The official specification states cross-origin attribute as −The crossorigin attribute is a CORS settings attribute. Its purpose is to allow images from third-party sites that allow cross-origin access to be used with canvas.When it is combined with CORS header, it would allow images defined by the element, loaded from foreign origins to be used in canvas. The procedure would be like being loaded from the current origin.You can use it to solve JavaScript errors like to log js errors −if (securityOrigin()->canRequest(targetUrl)) {    msg = myError;    line = myLineNumber;    source = sourceURL; } else {    msg = "Error!";    source = String();    line = 0; }

Remember and Repopulate File Input in HTML5

Nancy Den
Updated on 24-Jun-2020 14:19:24

326 Views

To repopulate, use the drag and drop. This was not possible before, but now it is valid.Let us see how −function drop(ev) {    ev.stopPropagation();    ev.preventDefault();      // retrieving dataTransfer field from the event    var d = ev.dataTransfer;    var files = d.files;    handleFiles(files); }For drag and drop −// dragging target.addEventListener('dragover', (ev) => {    ev.preventDefault();    body.classList.add('dragging'); }); // drag leave target.addEventListener('dragleave', () => {    body.classList.remove('dragging'); }); // drop target target.addEventListener('drop', (ev) => {    ev.preventDefault();    body.classList.remove('dragging'); });

Are new HTML5 elements like
and

Chandu yadav
Updated on 27-Jan-2020 06:11:15

143 Views

The elements and are useful for screenreaders as well and help visually impaired users in reading the content of your web page. These are beneficial for eBook readers as well.Let us see how to work with both the elements.           HTML Section Tag                        Java          Inheritance          Inheritance defines the relationship between superclass and subclass.                              Learning          Learn to gain experience and try to share your knowledge with others.                       Web Development Tutorials             Consist of CSS, HTML, and PHP tutorials for 2nd Semester exams.                                 Academic Tutorials             Consist of Computer Fundamental, Computer Network tutorials for             1st Semester exams.                    

Advertisements