Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Front End Scripts Articles
Page 3 of 47
How to integrate Google AdSense into your webpage?
If your website has sufficient content and good page views, you can start adding advertisements to earn money. Google AdSense is a free and easy way to monetize your website by displaying targeted ads. Integrating Google AdSense involves both account setup and technical implementation. Let's explore the complete process. Setting Up Your AdSense Account Follow these steps to create and configure your AdSense account: Go to the official AdSense website and sign in with your Google Account. Set up your account with all required details including website ...
Read MoreHow do we upload external file on a website using HTML forms?
If you want to allow a user to upload an external file to your website, you need to use a file upload box, also known as a file select box. This is created using the element with the type attribute set to file. HTML File Upload Form Choose file... Browse No file chosen Basic File Upload Example Here's a simple HTML form with a file upload input: File ...
Read MoreHow to use the submit button in HTML forms?
Submit button automatically submits a form on click. Using HTML forms, you can easily take user input. The tag is used to get user input, by adding the form elements. Different types of form elements include text input, radio button input, submit button, etc. Let's learn about how to use the submit button in HTML forms. It is created using HTML tag with the type attribute set to "submit". HTML Form with Submit Button ...
Read MoreHow to preselect Dropdown Using JavaScript Programmatically?
In this tutorial, we will learn how to preselect dropdown options using JavaScript programmatically. This is useful when you want to set default selections based on user preferences, data from APIs, or other dynamic conditions. A dropdown list is a toggle menu that allows users to select one option from multiple choices. In HTML, dropdown lists are created using the element combined with elements. JavaScript provides several methods to programmatically control these selections. There are two primary methods to preselect dropdown options: using the selectedIndex property and using the value property. Let's explore both approaches. ...
Read MoreHow to draw a star in HTML5 SVG?
SVG stands for Scalable Vector Graphics and is a language for describing 2D-graphics and graphical applications in XML. Most web browsers can display SVG just like they can display PNG, GIF, and JPG. To draw a star in HTML5 SVG, we use the element. The key is to set the correct x and y coordinates for each point of the star, alternating between outer points (tips) and inner points (valleys). 5-Point Star using SVG Polygon ...
Read MoreHow to use Meta Tag to redirect an HTML page?
Page redirection is a situation where you clicked a URL to reach a page X but internally you were directed to another page Y. It happens due to page redirection. To use a META Tag to redirect your site is quite easy. With this, use the http-equiv attribute to provide an HTTP header for the value of the content attribute. ...
Read MoreWhich event occurs in JavaScript when a dragged element is dropped?
The ondrop event occurs when a dragged element is successfully dropped on a valid drop target. This event is part of the HTML5 Drag and Drop API and must work together with ondragover to enable dropping functionality. How Drag and Drop Works The drag and drop process involves several events: ondragstart - When dragging begins ondragover - When dragged element is over a drop target ondrop - When element is dropped on target ondragend - When dragging operation ends Key Requirements For ondrop to work properly: The drop target must handle ondragover and ...
Read MoreSetting null values with an HTML using AngularJS.
In AngularJS, setting null values in select dropdowns requires proper model initialization and template configuration. This approach is useful when you want to handle undefined or empty selections. Controller Setup First, define the controller with a null-initialized model and populate the options array: function display($scope) { $scope.obj = {"selected": null}; $scope.objects = [{id: 1, value: "Yes"}, {id: 0, value: "No"}]; } HTML Template The template uses ng-options to populate the dropdown and includes a default "Unknown" option: ...
Read MoreHow to get the number of the internet host port for the current page in JavaScript?
In this tutorial, we will learn to get the number of internet host port for the current page in JavaScript. The Port number is a 16-bit unique identifier used by network protocols. Port numbers range from 0-65535 and help servers identify specific processes or services. Each port number has its own identity and purpose in network communication. Following are the methods by which we can get the port number of the internet host: Using the location.port Property Using the URL interface Using the location.port Property ...
Read MoreHow to put the WebBrowser control into IE9 into standards with HTML?
To put the WebBrowser control into IE9 standards mode, you need to add a specific meta tag to your HTML document. This ensures your web content renders using modern Internet Explorer standards rather than compatibility mode. The X-UA-Compatible Meta Tag The X-UA-Compatible meta tag tells Internet Explorer which rendering engine to use. It must be placed in the section of your HTML document. For Internet Explorer 9 To force IE9 standards mode, add this meta tag: For Latest IE Version (Edge Mode) To use the latest available IE rendering ...
Read More