<script>
window.onload = function(){
var btn = document.getElementById('btnId');
btn.onclick = function(){
var txt = document.createElement("textarea");
btn.parentNode.insertBefore(txt, btn);
};
};
</script>
More Related Contents:
- how do i submit message to my email by html or js?
- JS hide function error
- Create a new div element when button is clicked JavaScript [closed]
- how to view the answer of a js function in a html input? [duplicate]
- How to implement something like this GIF that using mouse drag and select items
- Javascript counting all the characters from a HTML document
- My form’s validate() is not working
- Why JS function name conflicts with element ID?
- Why is “element.innerHTML+=” bad code?
- Sanitize/Rewrite HTML on the Client Side
- Is it possible to hide the cursor in a webpage using CSS or Javascript?
- How to detect which one of the defined font was used in a web page?
- html 5 canvas LineTo() line color issues
- Conditionally load JavaScript file
- Is there a way to check if geolocation has been DECLINED with Javascript?
- How can I “reset” to its original state after it has been modified by JavaScript?
- How to separate web components to individual files and load them?
- Javascript Detect click event outside of div [duplicate]
- How to position a DIV in a specific coordinates?
- jQuery Validation using the class instead of the name value
- jQuery duplicate DIV into another DIV
- Modify the value of each textfield based on original value using jQuery
- How to keep the changes made to DOM by javascript/jquery on page refresh
- Saving and loading an image from localStorage
- Remove fragment in URL with JavaScript w/out causing page reload
- How best to make a link submit a form
- Control iframe content with javascript/html
- Can I use the id of an HTML element as a variable in JavaScript? [duplicate]
- How to use pagination on HTML tables?
- Pass element ID to Javascript function