how to set button width in javascript
var buttonShort = document.createElement("button");
buttonShort.innerHTML = "Generate Short Password";
var body = document.getElementsByTagName("body")[0];
buttonShort.style.width = '200px'; // setting the width to 200px
buttonShort.style.height = '200px'; // setting the height to 200px
buttonShort.style.background = 'teal'; // setting the background color to teal
buttonShort.style.color = 'white'; // setting the color to white
buttonShort.style.fontSize = '20px'; // setting the font size to 20px
body.appendChild(buttonShort);
buttonShort.addEventListener("click", function() {
var newWindow = window.open();
newWindow.document.write("The generated Password is: '" + short() + "'");
newWindow.focus();
});
Also in JavaScript:
- how to deep copy object in javascript
- electron file association
- adding bootstrap to angular global styles
- js percorrer objeto
- how to wait till jquery post request has been made
- form submit programmatically
- how to add script before </body> in magento 2
- check if localstorage key exists js
- create tic tac toe game in react using jsx files
- angular valuechanges get id
- jquery script
- react native background image
- clean cache in npm
- react router hooks
- select option trigger in js
- react can't import file 3 folders up
- js how to see console day tomorrow
- vuetify change text color of radio button
- how to add onclick event in javascript
- change inside div with jquery
- javascript store array in localstorage
- pdf javascript search text
- loading screen fivem js
- mvc form client side validation result callback