
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 8591 Articles for Front End Technology

123 Views
To set the order of the flexible item, relative to the rest of JavaScript, use the order property. You can try to run the following code to implement order property − Example Live Demo #box { border: 1px solid #000000; width: 420px; height: 150px; display: flex; } #box div { height: 80px; width: 80px; } DIV1 DIV2 DIV3 Set function display() { document.getElementById("myID1").style.order = "3"; document.getElementById("myID2").style.order = "1"; document.getElementById("myID3").style.order = "2"; }

2K+ Views
To inject JavaScript in WebBrowser control, use the following steps − Firstly, create a Windows Forms application in Visual Studio. Now, drag a WebBrowser control to the form Set the Url property. Right-click the project, choose to Add reference... → COM → Type Libraries Select "Microsoft HTML Object Library" Add the following code to inject JavaScript.private void myWebBrowser(object sender, WebBrowserDocumentCompletedEventArgs e){ // head element HtmlElement hElement = weBrowser.Document.GetElementsByTagName("head")[0]; // script element HtmlElement sElement = weBrowser.Document.CreateElement("script"); IHTMLScriptElement val = (IHTMLScriptElement)sElement.DomElement; element.text = "function sayHello() { alert('Weclome') }"; hElement.AppendChild(sElement); weBrowser.Document.InvokeScript("How you doing?"); }

110 Views
Use the alignContent property in JavaScript to set the alignment between the items inside a flexible container.ExampleYou can try to run the following code to implement alignContent property in JavaScript − #box { border: 1px solid #000000; width: 240px; height: 150px; flex-flow: row wrap; align-content: space-around; display: flex; } #box div { height: 80px; width: 80px; } DIV1 DIV2 DIV3 Set function display() { document.getElementById("box").style.alignContent = "space-between"; }

147 Views
Use the orphans property in JavaScript to set the minimum number of lines for an element that must be visible at the top of a page. You can try to run the following code to learn how to implement orphans property −document.getElementById("p").style.orphansThis is how you can return the orphans property −var res = object.style.orphans;This is how to set the orphans property −object.style.orphans='number|initial|inherit'

252 Views
If you want to define a new or modify a property on an object, then use the Object.defineProperty in JavaScript. Use the property like the following −Object.defineProperty(obj, prop, descriptor)The following are the parameters −obj – Property is defined on this object. prop – Name of the property descriptor − The descriptor for the propertyExampleYou can try to run the following code to learn how to implement Object.defineProperty in JavaScript − const obj = {}; Object.defineProperty(obj, 'prop', { value: 20, writable: false }); obj.prop = 10; document.write(obj.prop);

115 Views
Use the orphans property in JavaScript to set the minimum number of lines for an element that should be left at the bottom of a page when a page break occurs inside an element with JavaScript.You can return the orphans property like this −var res = object.style.orphansSet the orphans property like this −object.style.orphans = 'number|initial|inherit'The following are the property values shown above −number − Specify the minimum number of visible lines.Initial − Set property to its defaultInherit − Inherits property from the parent element

549 Views
Use the pageBreakBefore property in JavaScript to set the page-break behavior before an element. Use the always property to insert a page break before an element.Note − The changes would be visible while printing or viewing the print preview.ExampleYou can try to run the following code to return the page-break behavior before an element with JavaScript − Heading 1 This is demo text. This is demo text. This if footer text. Set page-break function display() { document.getElementById("myFooter").style.pageBreakBefore = "always"; }

3K+ Views
Use the pageBreakInside property in JavaScript to set the page-break behavior inside an element. Use the auto property to insert page break inside an element. Use auto or avoid property value to automatically insert page break inside an element, if needed, or avoid a page break, respectively.Note − The changes would be visible while printing or viewing the print preview.ExampleYou can try to run the following code to return the page-break behavior inside an element with JavaScript − Heading 1 This is demo text. This is demo text. This ... Read More

844 Views
Use the pageBreakAfter property in JavaScript to set the page-break behavior after an element. Use the always property for page after an element.Note − The changes would be visible while printing or viewing the print preview.ExampleYou can try to run the following code to return the page-break behavior after an element with JavaScript − Heading 1 This is demo text. This is demo text. This if footer text. Set page-break function display() { document.getElementById("myFooter").style.pageBreakAfter = "always"; }

173 Views
In this tutorial, let us look at the way to set whether the flexible items should wrap or not with JavaScript. We can use the flex-wrap property in JavaScript to set the item wrap value. Let us look into this in brief. Using the Style flex-wrap Property The flex-wrap property defines whether to wrap the items within a container element. The items must be flexible for the flex-wrap property to work. The default value is nowrap. Users can follow the syntax below to use the flex-wrap property. Syntax object.style.flexWrap = "nowrap|wrap|wrap-reverse|initial|inherit" The syntax above sets the flex-wrap value to ... Read More