php 基础求解,拜托各位了。小女子这项有礼了!!! 两个输入框,输入5,3时,在另一个界面出现一个5行3列的表格,前提是用函数实现这个功能.OK??? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <input type="text" name="a" id="a"/> <input type="text" name="b" id="b"/> //提交的路径你自己补上就是<form id="" action=""> $a=$_POST['a']; $b=$_POST['b']; function table($a,$b){ echo "<table border=\"1\" cellpadding=\"15\" >"; for($i=0;$i<$a;$i++){ echo "<tr>"; for($j=0;$j<$b;$j++){ echo "<td>".$j."</td>"; } echo "</tr>"; } echo "</table>"; } table(7,5); 我猜楼主是要JS实现的那种<!DOCTYPE html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><head><script language="javascript">function addTables(){ var table_box=document.getElementById("set_table"); table_box.innerHTML=''; var tr_count=document.getElementById('set_table_tr').value; var td_count=document.getElementById('set_table_td').value; if(tr_count && parseInt(tr_count)) { for(var i=0;i<tr_count;i++) { var new_tr=table_box.insertRow(-1); if(td_count && parseInt(td_count)) { for(var j=0;j<td_count;j++) { var new_td=new_tr.insertCell(-1); new_td.innerHTML=i*j; } } } }}</script></head><body><div>行:<input type="text" id="set_table_tr" onkeyup="addTables();"/>列:<input type="text" id="set_table_td" onkeyup="addTables();"/></div><div><table id="set_table" border="1"></table></div></body></html> 我发觉discuz的美工人员很差劲。。 [分享]PHP中利用pcntl进行多进程并发控制 php 每两个中文字符以中间添加一个逗号 如何实现 把php中的对mysql数据库的连接做成一个函数 急急急 有关文件下载,高手赐教!急,线上等!100分 请问PHP做全表搜索的SQL应该怎么写 php使用soap连接websevice,请高手解决问题 php 给图片加图片边框 php基础 IMap获取信件内容怎么筛选邮件??谁做过?请教了
<input type="text" name="a" id="a"/>
<input type="text" name="b" id="b"/>
//提交的路径你自己补上就是<form id="" action="">
$a=$_POST['a'];
$b=$_POST['b'];
function table($a,$b){
echo "<table border=\"1\" cellpadding=\"15\" >";
for($i=0;$i<$a;$i++){
echo "<tr>";
for($j=0;$j<$b;$j++){
echo "<td>".$j."</td>";
}
echo "</tr>";
}
echo "</table>";
}
table(7,5);
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<head>
<script language="javascript">
function addTables()
{
var table_box=document.getElementById("set_table");
table_box.innerHTML='';
var tr_count=document.getElementById('set_table_tr').value;
var td_count=document.getElementById('set_table_td').value;
if(tr_count && parseInt(tr_count))
{
for(var i=0;i<tr_count;i++)
{
var new_tr=table_box.insertRow(-1);
if(td_count && parseInt(td_count))
{
for(var j=0;j<td_count;j++)
{
var new_td=new_tr.insertCell(-1);
new_td.innerHTML=i*j;
}
}
}
}
}
</script>
</head>
<body>
<div>
行:<input type="text" id="set_table_tr" onkeyup="addTables();"/>
列:<input type="text" id="set_table_td" onkeyup="addTables();"/>
</div>
<div>
<table id="set_table" border="1">
</table>
</div>
</body>
</html>