<! Doctype html public "-// W3C // dtd html 4.0 Transitional // EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <meta name = "Generator "CONTENT =" EditPlus "> <meta name =" Author "CONTENT =" majianan "> <meta name =" Keywords "CONTENT =" "> <meta name =" Description "CONTENT = ""> </HEAD> <BODY> <table> <tr> <td id = 'A'> [a] </td> <td id = 'B'> [B] </td> <td id = 'C'> [c] </td> <td id = 'D'> [d] </td> <td id = 'E'> [e] </td> </tr> </table> <tr> <td> <input id = 't1' type = "text" value = "a"> </td> </tr> <td> <input id = 't2' type = "text" value = "B"> </td> </tr> <td> <input type = "button" value = "swap" onclick = "swap () "> </td> </tr> </BODY> </HTML>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
The above format is strange. I changed it a little with js. The text boxes are the indexes to be converted and cannot be entered at will.
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ptml xmlns = "http://www.w3.org/1999/xhtml"> <HEAD> <META content = "text/ html; charset = gb2312 "http-equiv = Content-Type> <TITLE> New Document </TITLE> <meta name =" Generator "CONTENT =" EditPlus "> <meta name =" Author "CONTENT =" majianan "> <meta name =" Keywords "CONTENT =" "> <meta name =" Description "CONTENT =" "> </HEAD> <BODY> <table> <tr> <td id = 'A'> [a] </td> <td id = 'B'> [B] </td> <td id = 'C '> [c] </td> <td id = 'D'> [d] </td> <td id = 'E'> [e] </td> </tr> </table> <tr> <td> <input id = 't1' type = "text" value = "a"> </td> </tr> <tr> <td> <input id = 't2' type = "text" value = "B"> </td> </tr> <td> <input type = "button" value = "swap" onclick = "swap () "> </td> </tr> </BODY> </HTML>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]