如何为每个阵列创建清除按钮? [英] How to create clear button for each array?

查看:73
本文介绍了如何为每个阵列创建清除按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Phil Pharmawealth</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="main.css">
<script src="main.js">
</script>
<style></style>
</head>
<body>
<?php $Names = array("Raquel","Ryan","Michael","Francis","Jansen")?>
<form action="">
<table>
<th>Names</th>
<?php for ($x=1; $x <= 5 ; $x++) { ?>
<th><?php echo $x?></th>
<?php }?>
<?php foreach ($Names as $NameArray) {?>
<tr>
<td><?php echo $NameArray?></td>
<?php for ($i=1; $i <= 5; $i++) { ?>
<td><input type="text" id="<?php echo $NameArray?>"></td>
<?php }?>    
<td>
<button type="reset" id="<?php echo $NameArray?>">Clear</button>
</td>
</tr>
<?php }?>
</table>
</form>
</body>
</html>





我尝试过:



我真的需要帮助谢谢专家



What I have tried:

I really need help thank you experts

推荐答案

名字=阵列(Raquel,Ryan,迈克尔, 弗朗西斯, 詹森)>?;
< form action =>
< table>
< th> Names< / th>
<?php for(
Names = array("Raquel","Ryan","Michael","Francis","Jansen")?> <form action=""> <table> <th>Names</th> <?php for (


x = 1;


x< = 5;
x <= 5 ;


这篇关于如何为每个阵列创建清除按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆