标题:为何文本框contact_subject和contact_details无法获得焦点?
只看楼主
micccn
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2008-8-19
结帖率:0
 问题点数:0 回复次数:0 
为何文本框contact_subject和contact_details无法获得焦点?
程序代码:
<script language="javascript">
<!--
function contact_us_btn_onclick(){
document.getElementById('contact_form').style.backgroundColor = "#FFF8DC";
document.getElementById('contact_form').style.display = "block";
}
function contact_cancel_onclick(){
document.getElementById('contact_form').style.display = "none";
}
function a1(){
document.getElementById('email_subject').focus();
return;
}
-->
</script>

<div style="position:relative;" id="contact_container">
                    <div id="contact_form" style="display:none;">
                    <br />
                        <h3><span>&nbsp;&nbsp;&nbsp;&nbsp;Customer Contact Center</span> </h3>
                        <div>
                            <form name="theform" action="" method="post">
    <input name="recipient_email" type="hidden" value="" />
    <input id="email_subject" name="subject" type="hidden" value="网友来信" />
                                <input name="contentWrite" type="hidden"/>
                                <input name='_csrf_token_' type='hidden' value='r4b8d76l99b0'>
                                <input name="emailcontent" type="hidden" />
                                <input name="message" type="hidden" />
                                <input name="sender_email" value="" type="hidden" />
                                <input name="done_url" type="hidden" value="" />
                                <p style="margin:0;padding:0 0 10px 0;text-align:center;">&nbsp;&nbsp;<input type="text" style="width:330px;" 

name="contact_subject" id="contact_subject" value="Please input the title..." onblur="return a1();" /></p>
                                <p style="margin:0;padding:0 0 10px 0;text-align:center;">&nbsp;&nbsp;<textarea style="width:330px;" id="contact_details"  

name="contact_details" rows="8" cols="25" >Email content...</textarea></p>
                                <p style="padding:0 6px 0 0;margin:0;text-align:center;">&nbsp;&nbsp;<input type="button" value=" Send Email " 

onclick="return formCheck()" />
                                <input type="button" value="Cancel" onclick="contact_cancel_onclick()" /></p>
                            </form>
                        </div>
                    </div>
                    <form> 
                      <p style="text-align:center;">
                        <textarea style="display:block;width:150px;margin:3px auto;" id="contact_us"  onclick="contact_us_btn_onclick()" class="hint" 

name="sender_remark" rows="4" cols="25">Email content...</textarea>
                        <input type="button" value="Send Email" onclick="contact_us_btn_onclick()" />
                      </p>
                    </form>
                </div>
搜索更多相关主题的帖子: subject 文本 焦点 
2008-08-19 18:21



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-229054-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.049317 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved