Jump to content

STRANGE !!! update table td select !!!!


faure

Recommended Posts

  thanks you in advance 

 

 

<!DOCTYPE HTML>


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">


<title>bz881</title>

<style>

</style>

<script type="text/javascript">

</script>


</head>


<body>
    

<table>    
<tr>
<td> <input   type= "text"   id = 'two01'    value= 'xxxxxxx'  > </td>

</table>
    
        
        
      


<script type="text/javascript">
    

function  mymyFunction()

{
    
    
    var x = document.getElementById('mymySelect').value;
    
    
  <!-- here ok-->  
    document.getElementById('demodemo').innerHTML =  x;

    <!-- here not working -->    

    document.getElementById('two01').innerHTML =  x;
        
}
    

    

</script>
    

    
    

 

 

 

<select id='mymySelect' onchange="mymyFunction()">

  <option value="Audi">Audi
  <option value="BMW">BMW
  <option value="Mercedes">Mercedes
  <option value="Volvo">Volvo
</select>

 

<p id="demodemo">????</p>
    
</body>

</html>       
        

        


        

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...