2 baidu 28759977 baidu_28759977 于 2015.06.05 00:22 提问

代码改成pdf上传路径成功,但内容无法上传,哪位大神帮忙改改





文档管理



<body style="text-align:center;">
<div data-role="page" id="pageone">
    <div data-role="content">
        <div data-role="navbar">
            <ul>
                <li><a href="Cre_Manage_Stu.php" data-icon="back">返回</a></li>
                <li><a href="Cre_Logout.php"  data-icon="power">注销登录</a></li>
            </ul>
        </div>
        <br />

        <p class="error"><?php echo $error_msg; ?></p>
        <form name="form1" method="post" enctype='multipart/form-data' action="Cre_Add_php.php">

            <hr width="320px">
            <table style = "width:300px; margin:0px auto;border-color:#999;">
                <tr>
                    <td>学&nbsp;&nbsp;号:</td>
                    <td><input name="stu_id" type="int" /></td>
                    <td>*</td>
                </tr>
                <tr>
                    <td>姓&nbsp;&nbsp;名:</td>
                    <td><input name="stu_name" type="text" /></td>
                    <td>*</td>
                </tr>
                <tr>
                    <td>班&nbsp;&nbsp;级:</td>
                    <td><input name="stu_class" type="text" /></td>
                    <td>*</td>
                </tr>
                <tr>
                    <td>文档名称</td>
                    <td><input name="video_name" type="text" /></td>
                    <td>&nbsp;</td>
                </tr>



                <tr>
                    <td>文档:</td>
                    <td><input name="v_url" type="file" /></td>
                    <td>*</td>                      
                </tr>


            </table>

            <input type="submit" name="submit1" value="提交" onClick="return check(form1)"/><br>
        </form>

        <script language="javascript">
            function check(form){
                if(form.stu_id.value==""){
                    alert("请输入学号");
                    form.stu_id.focus();
                    return false;
                }
                if(form.stu_name.value==""){
                    alert("请输入姓名");
                    form.stu_name.focus();
                    return false;
                }
                if(form.stu_class.value==""){
                    alert("请输入班级");
                    form.stu_class.focus();
                    return false;
                }
                if(form.cer_name.value==""){
                    alert("请输入文档名称");
                    form.video_name.focus();
                    return false;
                }

                if(form.cer_photo.value==""){
                    alert("请上传文档");
                    form.v_url.focus();
                    return false;
                }

                form.submit();                  
            }            

    </script>            

    </div>

    <div style="padding:5px;width:100%;color:#888;font-size:12px;">

    </div>
</div>


1个回答

frank_20080215
frank_20080215   2015.06.05 05:50

,没有配备文件上传的JS函数
Csdn user default icon
上传中...
上传图片
插入图片