这是上传图书的表格。 “提交”按钮未激活。 请帮忙。表单通过POST发送到名为upload.php的文件 有两个部分:主体和身体 身体进一步分为 头 bodylop 页脚 bodylop进一步分为 body1 body2 body3
表单在body1中 当我将光标放在提交按钮上方时,它不会显示http://localhost/Booksharing/upload.php
当我点击它 什么都不会发生
<?php session_start(); ?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Uploading Book</title>
<LINK rel="stylesheet" type="text/css"
href="stylesheets/style2.css" title="Default Styles" media="screen">
</head>
<body>
<div class= 'main'>
<div class = 'headlop'>
<?php
include ('header.php');
?>
</div>
<div class = 'body'>
<div class = 'bodylop'>
<div style="position:absolute; margin-left:5%; top:4%; height:50%; width:50%;">
<table width="90%" height="80%" border="5">
<form method="post" action="upload.php">
<tr>
<th colspan="2"> <center> BOOK DETAILS </center>
</tr>
<tr>
<td> Name
<td> <input type="text" size="40" maxlength="50" name="bName" />
</tr>
<tr>
<td> Author
<td> <input type="text" size="40" maxlength="50" name="author" />
</tr>
<tr>
<td> Type
<td> <select name="type">
<option value="Newsletter">Newsletter</option>
<option value="Course Book">Course Book</option>
<option value="Reference Book">Reference Book</ option>
<option value="Magazine">Magazine</option>
<option value="Novel">Novel</option>
<option value="Journal">Journal</option>
</select>
</tr>
<tr>
<td> Genre
<td> <input type="text" size="20" maxlength="30" name="genre" />
</tr>
<tr>
<td> Condition
<td> <input type="text" size="40" maxlength="50" name="cond" />
</tr>
<tr>
<td> Price
<td> <input type="int" size="40" maxlength="50" name="price" />
</tr>
<tr>
<td> Origin
<td> <input type="text" size="40" maxlength="50" name="orig" />
</tr>
<tr>
<td> Tags
<td> <input type="text" size="40" maxlength="50" name="tags" />
</tr>
<tr>
<td colspan='2' align="center"> <input type="submit" value="Submit" />
</tr>
</form>
</table>
</div>
<div style="
margin-left:5%; top:50%; height:50%; width:50%; position:absolute;">
</br>
</br>
</br>
<A HREF = "publish.php">Upload/Publish</A> </br>
<A HREF = "others.php">View What others have posted </A> </br>
</div>
<div style="position:absolute; margin-left:50%; top:0%; height:100%; width:50%; size:8px; padding:1cm 1cm 1cm 1cm;">
</div>
</div>
<div class = 'footlop'">
<?php include('footer1.php'); ?>
</div>
`
答案 0 :(得分:3)
这个DIV正在通过提交按钮
<div style="
margin-left:5%; top:50%; height:50%; width:50%; position:absolute;">
<br>
<br>
<br>
<a href="publish.php">Upload/Publish</a> <br>
<a href="others.php">View What others have posted </a> <br>
</div>
避免使用绝对位置,或者在这种情况下使用萤火虫检查元素,它会突出显示它们。