javascript - Change content of div on button click -


i new php. want change content of div on click of button can set other text.

<div id="container">     <b>dear abc,</b>      <p>thank order. order #" .$row['ordnum']."</p>     <table>         <tbody>         <tr>             <th>ord_id</th>         </tr>         <tr>             <td>.$row['order_id']."</td>         </tr>     </table>     <p>thank you</p> </div> <input type="button" value="change"/> 

i want user update message content above on button click. order not coming db.

how allow user edit of text data except orderid?

you can request content @ file in same directory called xyz.php

with jquery

$.ajax({     url: 'xyz.php',     type: 'get',     success: function(data){         $('#container').html(data)     } }) 

the php file outputs text

<?php  echo "<strong>yo</strong>"; 

maybe idea


Comments