How to switch between some divs and disable other?

#1
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Test</title>
    <body>
        <div>
            <button id="btn1">Show Avia</button>
            <button id="btn2">Show train</button>
        </div>
<!-- <div>
            <button id="btn1">Show Avia</button>
            <button id="btn2">Show train</button>
        </div> -->
        
        <div id="avia">	
        	<input type="text" placeholder="Avia">
        </div>

        	<div id="train">	
        		<input type="text" placeholder="Train">
        	</div>

        <script type="text/javascript">
            document.getElementById('btn1').onclick=function(){showdiv('avia');}
            document.getElementById('btn2').onclick=function(){showdiv('train');}
            function showdiv(fileName){
                document.getElementById('avia').src = fileName;
            }
        </script>
    </body>

</body>
</html>
#2

Welcome to the forums, @mirvokhidstart. I really don’t understand your post. Could you please elaborate?

#3
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Test</title>
    <body>
        <div>
            <button id="btn1">Show Avia</button>
            <button id="btn2">Show train</button>
        </div>
        
        <div id="avia">	
        	<input type="text" placeholder="Avia">
        </div>

        	<div id="train">	
        		<input type="text" placeholder="Train">
        	</div>

        <script type="text/javascript">
            document.getElementById('btn1').onclick=function(){showdiv('avia');}
            document.getElementById('btn2').onclick=function(){showdiv('train');}
            function showdiv(fileName){
                document.getElementById('avia').src = fileName;
            }
        </script>
    </body>
</body>
</html> 
#4

this website ignores to show part of code it is

<div>
            <button id="btn1">Show Avia</button>
            <button id="btn2">Show train</button>
        </div> 
#5

@mirvokhidstart when you post code in the forum, you need to format it. To do so you can either select all the code and click the </> button, or type 3 backticks ``` on a separate line both before and after the code block.

I think this may be part of your problem, but you still haven;t explained what your question is.