Found 10711 Articles for Web Development

What is ECMAScript and how it is related to JavaScript?

V Jyothi
Updated on 02-Jan-2020 07:59:38

261 Views

JavaScript conforms to ECMAScript standard. JavaScript was first known as LiveScript, but Netscape changed its name to JavaScript, possibly because of the excitement being generated by Java. JavaScript made its first appearance in Netscape 2.0 in 1995 with the name LiveScript. The general-purpose core of the language embedded in Netscape, Internet Explorer, and other web browsers.The ECMAScript Edition 5 standard was the first update to be released in over four years. JavaScript 2.0 conforms to Edition 5 of the ECMAScript standard, and the difference between the two is extremely minor.The 8th edition, known as ECMAScript 2017, came in June 2017.The ... Read More

What was the name of JavaScript when it was created?

Priya Pallavi
Updated on 02-Jan-2020 07:59:07

857 Views

JavaScript launched in May 1995 by Brendan Eich, who used to work at Netscape. Initially, it wasn’t called JavaScript; it was given the name Mocha.The name Mocha was chosen by Marc Andreessen, a Netscape founder. The name was changed to LiveScript in September 1995. In the same year, December, it received a trademark license from Sun and the name JavaScript came into the picture.The general-purpose core of the language has been embedded in Netscape, Internet Explorer, and other web browsers.The ECMA-262 Specification defined a standard version of the core JavaScript language.JavaScript is a lightweight, interpreted programming language.Designed for creating network-centric ... Read More

How to check if a string has a certain piece of text in JavaScript?

Nikitha N
Updated on 12-Sep-2019 07:21:59

89 Views

The jQuery search() method is used to check whether a string contains a certain text in JavaScript.You can try to run the following code to check whether “Tutorialspoint: Free Video Tutorials” contains the “Free Video” text in JavaScript or not:           JavaScript String search() Method                        var re = "Free Video";          var str = "Tutorialspoint: Free Video Tutorials";          if ( str.search(re) == -1 ) {             document.write("Does not contain" );          } else {             document.write("Contains" );          }          

How to implement basic Animation in JavaScript?

Abhinanda Shri
Updated on 16-Jun-2020 06:25:09

89 Views

To implement basic Animation in JavaScript, use the DOM object properties and JavaScript. The following list contains different DOM methods.We are using the JavaScript function getElementById() to get a DOM object and then assigning it to a global variable imgObj.We have defined an initialization function init() to an initialize imgObj where we have to set its position and left attributes.We are calling an initialization function at the time of window load.Finally, we are calling moveRight() function to increase the left distance by 10 pixels. You could additionally set it to a negative value to move it to the left side.         ... Read More

How do I remove a particular element from an array in JavaScript

Ankitha Reddy
Updated on 30-Jul-2019 22:30:20

761 Views

To remove an element from an array, use the splice() method. JavaScript array splice() method changes the content of an array, adding new elements while removing old elements. The following are the parameters − index − Index at which to start changing the array. howMany − An integer indicating the number of old array elements to remove. If howMany is a 0, then no elements are removed. element1, ..., elementN − The elements adds to the array. If you don't specify any elements, splice simply removes the elements from the array. You can try to run the following ... Read More

Static HTML elements are written directly in SAPUI5

Johar Ali
Updated on 30-Jul-2019 22:30:20

372 Views

SAPUI5 allows the developer to use their own static HTML elements with the use of UI5 controls in certain areas. It is not closed framework and allows you to use a sap.ui.core.HTML control to write any amount of plain HTML within an area rendered by UI5 so it allows you to easily mix HTML and UI5 controls.HTML created by UI5 controls, however, is created dynamically, but that's how many JavaScript UI libraries work when providing higher-level UI elements that would be hard to write in static HTML.You can refer to below link of SAPUI5 which tells more about HTML SAPUI5 ... Read More

Page build in HTML and wanted to load into JS view in SAPUI5 application.

Ali
Ali
Updated on 25-Feb-2020 11:06:12

400 Views

The most commonly used way of doing this is to embed the HTML page as an iframe. Here is the example.new sap.ui.core.HTML({    preferDOM: true,    content: "" });It can also be loaded using AJAX call or display using sap.ui.core.HTML, but it will depend upon your HTML page.

In dynamic fashion setting a custom class to a cell in a row

Amit Sharma
Updated on 25-Feb-2020 11:07:08

69 Views

If you need to set CSS properties for a row, then what you can try is to use the predefined CSS class of the table along with the custom class. For Example.sapMListTbl . {    margin: 10px;    color: #ffffff; }Also, you can opt for a formatter while applying the new class along with your model classes.

How to check whether a string contains a substring in JavaScript?

Abhinaya
Updated on 20-Apr-2022 12:44:47

655 Views

JavaScript provides us with different methods to check whether a string contains a substring or not. In this article, we use the following three methods for this purpose-String search() methodString indexOf() methodString includes() methodLet’s explore in detail each method.1. String search() methodThe string search method can be used to search a text (using regular expression) in a string.It matches the string against a regular expression and returns the index (position) of the first match.It returns -1 if no match is found. It’s case-sensitive.The string search() method is an ES1 feature. It is fully supported in all browsers.Syntaxstring.search(searchValue)searchValue is a regular ... Read More

Why do we use "use strict" in JavaScript?

Govinda Sai
Updated on 20-Apr-2022 12:30:05

567 Views

The “use strict” is a directive, which is a literal expression. It was introduced in JavaScript 1.8.5. As the name suggests, “use strict” indicates that the code is to be executed in strict mode.Benefits of using “use strict”It’s easier to write "secure" JavaScript codes.It changes previously accepted "bad syntax" into real errors. As an example, mistyping a variable name creates a new global variable. When using strict mode, this will throw an error. It leads to making it impossible to accidentally create a global variable.A programmer will not receive any error feedback assigning values to non-writable properties.But in strict mode, ... Read More

Advertisements