English 中文(简体)
添加<格式>后的问题?
原标题:Problem after adding <form>?

在我网页上添加<代码><form>时,我的所有javascript都停止了工作,在把表格放在我桌子开始时,就错了了。 下面是我在其他浏览器上测试后操作的手法,但到底是:

更新:在核对火灾fox java错误之后,似乎有<条码>。 职能的定义

最新情况2:删除我的错误为<script category=“text/jscript”>是错误的,即为什么在火f上工作,而在其他情况下,工作必须达到<script打字=“text/javascript”>

<!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>Sabay Afrah.Inc | Contact Us</title>
<script src="js/clear.js" language="javascript" type="text/javascript"></script>
<script src="js/SpryValidationSelect.js" type="text/javascript"></script>
<script type="text/jscript">

function Checking(form){

if(empty(form.fname.value){

         alert("do nothing");

         }
}

</script>

<style type="text/css">
<!--
body {
    background-color: #000;
}
body,td,th {
    color: #FFF;
    font-size: 14px;
}
.address {
    font-family: "Comic Sans MS", cursive;
    font-weight: bold;
}
-->
</style>
<link href="theme/style.css" rel="stylesheet" type="text/css" />
<link href="theme/SpryValidationSelect.css" rel="stylesheet" type="text/css" />
</head>

<body>
<form  action="enterdb.php" method="post">
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">&nbsp;</td>
  </tr>
  <tr>
    <td><table width="1006" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="4">&nbsp;</td>
        <td width="93" align="right">&nbsp;</td>
        <td width="4">&nbsp;</td>
        <td width="374" ><img src="images/logo.png" width="230" height="114" /></td>
        <td width="426" align="right" class="address">
        10 GlenLake parkway<br />
Suite 130, mailbox # 76<br />
Atlanta, GA 30328<br />
Phone #: + 678-222-3442<br />
Fax #: +678-222-3401<br />
Office hours: M-F 8:30 a.m. to 5:00 p.m.<br />
        </td>
        <td width="99">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="5"><table width="600" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>&nbsp;</td>
            <td class="title">&nbsp;</td>
          </tr>
          <tr>
            <td width="84"><br /></td>
            <td width="516" class="title">Contact Us</td>
          </tr>
        </table></td>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>

    <table width="883" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr class="table">
        <td width="27" rowspan="10" bgcolor="#330099" class="textable">&nbsp;</td>
        <td colspan="2" bgcolor="#330099" class="textable">&nbsp;</td>
        <td width="29" rowspan="8" bgcolor="#330099" class="textable">&nbsp;</td>
        <td colspan="3" class="textable">&nbsp;</td>
        </tr>
      <tr >
        <td width="139" height="31" bgcolor="#330099" class="textable">First Name:</td> <td>

         <input id="fname" name="fname" type="text" size="40" /> </td>
        <td width="150" class="textable">Last Name:</td>
        <td width="265" class="textable"><table width="200" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td ><table width="200" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td ><input id="lname" name="lname" type="text" size="40"  /></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
        <td width="32" class="textable">&nbsp;</td>
      </tr>
      <tr>
        <td height="30" class="textable">Subject:</td> <td>
          <span id="spryselect1">
            <label>
              <select name="sub" id="sub">
              <option> Choose a Subject</option>
              <option> General Question</option>
              <option> MemberShip Area</option>
              <option> Others</option>

              </select>
            </label>
            <span class="selectRequiredMsg">Please select a Subject.</span></span>
        </td>
        <td colspan="3" class="textable">&nbsp;</td>
        </tr>
      <tr>
        <td height="33" class="textable">Company Name:</td> <td> <input id="cname" name="cname" type="text" size="40"   /></td>
        <td class="textable">Company Address:</td>
        <td class="textable"><table width="200" border="0" cellspacing="0" cellpadding="0">

          <tr>
           <td><input id="cadd" name="cadd" type="text" size="40" onclick=""  /></td>
          </tr>

        </table></td>

        <td class="textable">&nbsp;</td>
      </tr>
      <tr>
        <td height="31" class="textable">Phone Number:</td> <td><input id="phonen" name="phonen" type="text" size="40"  /> </td>
        <td colspan="3" rowspan="4" class="textable">&nbsp;</td>
        </tr>
      <tr>
        <td height="31" class="textable">Fax Number:</td><td> <input id="faxn" name="faxn" type="text" size="40" /></td>
        </tr>
      <tr>
        <td height="32" class="textable">Email Address:</td><td><input id="email" name="email" type="text" size="40" /></td>
        </tr>
      <tr>
        <td colspan="2" class="textable">&nbsp;</td>
        </tr>
      <tr>
        <td valign="top" class="textable">Additional Information:</td>
        <td colspan="5" class="textable"><table width="600" border="0" align="left" cellpadding="0" cellspacing="0">
          <tr>
            <td colspan="2" align="center">

            <textarea id="add" name="add" cols="70" rows="10" /></textarea>
            </td>
            </tr>
          <tr>
            <td align="center" class="textable">
              <input name="Submit" type="submit"  value="Submit" onclick="Checking()"/>
            </td>
            <td align="center" class="textable">

            <input type="reset"  value="Clear" />



            </td>
          </tr>
        </table></td>
        </tr>
      <tr>
        <td colspan="6" class="textable">&nbsp;</td>
        </tr>
    </table></td>
  </tr>
</table>
</form>
<script type="text/javascript">
<!--
var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1");
//-->
</script>
</body>
</html>
最佳回答

添加一份提交表格的表格:

<form  action="enterdb.php" method="post" enctype="application/x-www-form-urlencoded" onsubmit="return Checking(this);">

然后,将浮标活动从提交纽州移走。

您需要通过表格对核对功能提出异议,从而通过<代码>>。 而且,当用户提交表格时,或者通过点击提交书子或以表格的形式进入其他地方,通常最好把手打上标号。

在每个网络上学习。

问题回答

你的职能是采取形式要素,而你提交纽特时没有向这一职能提供任何信息。 d 我假定它不提出,因为你的职责是错失,从而阻止纽托邦,就像它回来是假的。 ix,努力利用火力,帮助你发现这些问题。

总的来说,建议你首先澄清js和SpryValidationSelect.js,然后尝试操作你的代码,用一个javascript文档添加一个编号,以明确界定与你的在线密码文本相撞的档案。

此外,还试图增加贵方的国名,并尝试这样做:

function Checking(form){

  if(empty(window.myform.fname.value){

         alert("do nothing");

         }
  }

这样做是为了贬低某些东西,最好尝试不同的方法,有时你会发现这些方法不容易。

只是我的想法。 uck





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签