Javascript examples for DOM HTML Element:Button
Button formEnctype Property - returning the formEnctype property:
<!DOCTYPE html> <html> <body> <form action="/action_page_binary.asp" method="post"> Name: <input type="text" name="fname" value="your name"><br> <button type="submit">Submit with character encoding</button> <button id="myBtn" type="submit" formenctype="text/plain">Submit without character encoding</button> </form>/*from w w w .j av a 2 s . co m*/ <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myBtn").formEnctype; document.getElementById("demo").innerHTML = x; } </script> </body> </html>