我有下面的div
<html>
<body>
<link rel="stylesheet" type="text/css" href="style.css">
<?php
$name = $_POST["name"];
$phone = $_POST["phone"];
$core = $_POST["core"];
$command = "pushmsg echo $name echo $phone echo $core";
$output = exec($command);
?>
<h1>request submited successfully</h1>
<p>thanks for sending yout request, <?php echo $_POST["name"]; ?>.<br>
a text will be sent to <?php echo $_POST["phone"]; ?> once your details have been confirmed.
</p>
<div class="center">
<button class="button" action="/index.html">home page</button>
</div>
</body>
</html>
我需要通过单击Name或Status div标题对上面的结构进行排序,它应该相应地对数据进行排序。
请帮助我。
答案 0 :(得分:0)
您可以使用键值对准备一个json对象数组。例如。 [{&#34; name&#34;:&#34; xyz&#34;,&#34; status&#34;:&#34; available&#34;}]对其进行排序并使用动态html重新绑定。请点击以下链接Sort json