为何文本框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> 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;"> <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;"> <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;"> <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>