How to sort and output the registration list
天行健
天行健 2017-07-27 20:48:29
0
1
1328

<body>

<!-- Create a multi-dimensional array containing student number, name, and age. The form transfers the data to the array and stores it. The array outputs all data in sorted order

This page is bm.php. Fill in the form data on this page. After clicking submit, enter all registered lists directly below the form.

-->

<? php


var arr=new Array();//Define array


?>


<form method="post" action="bm.php">

<label>Reading Notice Registration Office</label><br />

Seat number:<input type="text" name="hao" value="arr[0]"/><br/>

Name: <input type="text" name="xm" value="arr[1]"/><br/>


##<input type= "submit" value="submit">


</form>




##The following students have been informed<br/>


#< ?php

var myform=document.getElementsByTagName('form')[0];

var xinp=myform.getElementsByTagName('input');//Get all input boxes in the form

for(var i=0;i<xinp.length;i )//Loop

{

echo arr[i]=xinp[i].value;/ /Pay the value in each input box to the corresponding item in the array

}

天行健
天行健

向着目标,每天进步!

reply all(1)
大家讲道理

JavaScript array has built-in sorting function

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template