Echo ' <input onclick=""/>'; not work

php script
echo ’ <input onclick=“openbox(“win1”)”/>’; - not work

js :

 function openbox(id){
    display = document.getElementById(id).style.display;
    if(display=='none'){
       document.getElementById(id).style.display='block';
      
    }else{
       document.getElementById(id).style.display='none';
    }

Can you try this?

echo '<input type="button" onclick="openbox('."'win1'".')" />';
1 Like

thank you. It work :slight_smile:

1 Like