Change div to display inline - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Div

Description

Change div to display inline

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <script>
            function show()//from  ww w . j a  v a  2  s  .co  m
            {
                document.getElementById('box').style.display='inline';
            }
        
      </script> 
   </head> 
   <body> 
      <div id="show">
         <a href="#" onclick="show()">Upload my file</a>
      </div>
      <a href="#" onclick="show()"> 
         <div id="box" style="display:none" ;>
            <input type="file">
         </div>  
      </a>
   </body>
</html>

Related Tutorials