0

我有以下代码:

<body>
<div id="cp_container">
<a href="#" onclick="show_questions_panel()" >Questions</a>
<a href="#" onclick="show_profile_panel()" >Profile </a>

<div id="cp_questions_panel">

    <div id="cp_button_container">
        <a href="#" onclick="show_all_questions()" >All Questions </a>
        <br>
        <a href="#" onclick="show_un_answered_questions()" >  Un Answered Questions</a>

    </div>

    <div id="cp_all_questions">

    </div>

    <div id="cp_un_answered_questions">
        <div id='question_edit_form'>

            <form  method="post" action="cpanel.php#cp_un_answered_questions">

                <label>Question Title </label><br>
                <input type="text" name="question_title_edit" id='question_title_edit'>
                <br>
                <label>Question</label><br>
                <textarea name="question_edit" id="question_edit" rows="5" cols="50"></textarea>
                <br>
                <label>Answer Title </label><br>
                <input type="text" name="answer_title_edit" id="answer_title_edit">
                <br>
                <label>Answer</label><br>
                <textarea name="answer_edit" id="answer_edit" rows="5" cols="50"></textarea>
                <br>

                <input type="input" name="question_id_edit" id="question_id_edit">
                <input type="submit" value="Save">

            </form>

        </div> <!--End of  question_edit_form-->

    </div> <!-- End Of cp_un_answered_questions -->

</div> <!-- End Of cp_questions_panel -->

<div id="cp_profile_panel">

</div>

在上面的代码中存在这一行:

<form  method="post" action="cpanel.php#cp_un_answered_questions">

但提交表单后,浏览器会转到“cpanel.php”页面。我希望浏览器转到提交的表单以报告提交结果。热解决了吗?

4

0 回答 0