editable table ajax
<div class='container'>
<table width='100%' border='0'>
<tr>
<th width='10%'>S.no</th>
<th width='40%'>Username</th>
<th width='40%'>Name</th>
</tr>
<?php
$query = "select * from users order by name";
$result = mysqli_query($con,$query);
$count = 1;
while($row = mysqli_fetch_array($result) ){
$id = $row['id'];
$username = $row['username'];
$name = $row['name'];
?>
<tr>
<td><?php echo $count; ?></td>
<td>
<div contentEditable='true' class='edit' id='username_<?php echo $id; ?>'>
<?php echo $username; ?>
</div>
</td>
<td>
<div contentEditable='true' class='edit' id='name_<?php echo $id; ?>'>
<?php echo $name; ?>
</div>
</td>
</tr>
<?php
$count ++;
}
?>
</table>
</div>.edit{
width: 100%;
height: 25px;
}
.editMode{
border: 1px solid black;
}
/* Table Layout */
table {
border:3px solid lavender;
border-radius:3px;
}
table tr:nth-child(1){
background-color:dodgerblue;
}
table tr:nth-child(1) th{
color:white;
padding:10px 0px;
letter-spacing: 1px;
}
/* Table rows and columns */
table td{
padding:10px;
}
table tr:nth-child(even){
background-color:lavender;
color:black;
}
Also in JavaScript:
- SELECT DISTINCT ON expressions must match initial ORDER BY expressions django
- return this javascript
- how to print elements in an array in javascript
- javascript set header text
- javascript type casting int
- how to see my timezone using js
- javascript combine two index elements
- load +main.js with system.import
- jquery remove string from string
- javascript how to trigger an event
- node download s3 file
- dracula theme color scheme windows terminal app
- get pods on specific node
- react native vector icons
- max char js
- ISS proxy express
- how to get element by class name javascript
- react recaptcha signup form
- new line with javascript write
- javascript add to object
- check if checkbox is checked javascript
- string methods javascript
- 3 letter months javascript array
- javascript get element by class