Nishtha Thakur has Published 568 Articles

Selects all elements with alt attribute containing the word "Tutorials" with CSS

Nishtha Thakur

Nishtha Thakur

Updated on 24-Jun-2020 06:09:54

193 Views

Use the [attribute ~= "value"] selector to select elements with an attribute value containing a specified word with CSS.You can try to run the following code to implement the [attribute ~= "value"] selector. Here, the word we are searching is “Tutorials”, ExampleLive Demo           ... Read More

Style select options with CSS

Nishtha Thakur

Nishtha Thakur

Updated on 23-Jun-2020 15:28:35

2K+ Views

To style the options in , you can try to run the following code,ExampleLive Demo                    select {             width: 100%;             padding: 10px 15px;             border: 1px dashed blue;             border-radius: 4px;             background-color: orange;          }                     Learn,                             Java             Ruby             Oracle             Tableau                    

Where can I find the current C or C++ standard documents?

Nishtha Thakur

Nishtha Thakur

Updated on 23-Jun-2020 13:59:38

67 Views

You can find the current C standard documents on ANSI web store. https://webstore.ansi.org/RecordDetail.aspx?sku=INCITS%2FISO%2FIEC+9899-2012You can find the current C++ standard documents on the ISO C++ website for buying −  https://www.iso.org/standard/68564.htmlThe working draft of the ISO C++ standard is also available on  https://isocpp.org/std/the-standardRead More

How to work with addEventListener() method in JavaScript HTML DOM?

Nishtha Thakur

Nishtha Thakur

Updated on 23-Jun-2020 12:11:48

278 Views

Use the addEventListener() method to attach an event handler.ExampleYou can try to run the following code to learn how to work with addEventListener() method in JavaScript −           Double click the below button.       Double Click                      document.getElementById("btnid").addEventListener("dblclick", displayEvent);          function displayEvent() {             document.getElementById("pid").innerHTML = Date();          }          

Which is the event when the browser window is resized in JavaScript?

Nishtha Thakur

Nishtha Thakur

Updated on 23-Jun-2020 09:18:50

79 Views

Use window.outerWidth and window.outerHeight event in JavaScript to get the size of windows when the browser is resized.ExampleYou can try to run the following code to work with events to check the browser window size −                    function resizeFunction() { ... Read More

Set the milliseconds for a specified date according to universal time.

Nishtha Thakur

Nishtha Thakur

Updated on 23-Jun-2020 07:38:52

133 Views

Javascript date setUTCMilliseconds() method sets the milliseconds for a specified date according to universal time.The following is the parameter for setUTCMilliseconds(millisecondsValue) −millisecondsValue − A number between 0 and 999, representing the milliseconds.ExampleYou can try to run the following code to set the milliseconds for a specified date according to universal time ... Read More

What are the document properties which can be accessed using Legacy DOM?

Nishtha Thakur

Nishtha Thakur

Updated on 23-Jun-2020 07:22:35

85 Views

The following are the document properties which can be accessed using Legacy DOM −Sr.NoProperty & Description1alinkColorDeprecated − A string that specifies the color of activated links.Ex − document.alinkColor2anchors[ ]An array of Anchor objects, one for each anchor that appears in the documentEx − document.anchors[0], document.anchors[1] and so on3applets[ ]An array ... Read More

How can I turn on error information in my Web Browser?

Nishtha Thakur

Nishtha Thakur

Updated on 23-Jun-2020 07:04:14

248 Views

The most basic way to track down errors is by turning on error information in your browser. By default, Internet Explorer shows an error icon in the status bar when an error occurs on the page.Double-clicking this icon takes you to a dialog box showing information about the specific error ... Read More

What is the best way to do optional function parameters in JavaScript?

Nishtha Thakur

Nishtha Thakur

Updated on 23-Jun-2020 06:49:42

169 Views

To include optional function parameters in JavaScript, you can try the following, function myFunc(a, b = 0) {    // function body }ExampleYou can try to run the following code to learn how to include optional function parameters −                    // ... Read More

Write a Regular Expression to remove all special characters from a JavaScript String?

Nishtha Thakur

Nishtha Thakur

Updated on 23-Jun-2020 05:34:43

505 Views

To remove all special characters from a JavaScript string, you can try to run the following code −Example                    var str = "@!Welcome to our website$$";          document.write(str);                    // Removing Special Characters          document.write(""+str.replace(/[^\w\s]/gi, ''));                      

Previous 1 ... 4 5 6 7 8 ... 57 Next
Advertisements