我正在尋找一種在Href中設置LocalStorage的方法。這是PHP代碼: <table cellspacing="0"> <tr> <th>ID</th> <th>Name</th> <th>View</th> <th>Edit</th> </tr> <?php $count=1; $sel_query="Select * from userdetails ORDER BY id desc;"; $result = mysqli_query($con,$sel_query); while($row = mysqli_fetch_assoc($result)) { //something has to be done later. ?> <tr> <td align="center"><?php echo $count; ?> <td align="center"><?php echo $row["docname"]; ?> <td align="center"><a href="view.php?id=<?php echo $row["id"]; ?>">View</a></td> <td align="center"><a href="edit.php?id=<?php echo $row["id"]; ?>">Edit</a></td> </tr> <?php $count++; } ?> </table>單擊編輯或查看后,我要存儲“ $ row [“ id”];“ 到本地存儲?我需要在本地存儲中使用此文件,因為我正在使用正在尋找localstorage [key]的js庫。如果可能的話,這可能嗎?
使用php在ahref中發送LocalStorage
守候你守候我
2021-05-06 13:13:02