我怎样才能在asp.net中运行这个使用mootools库的脚本?

发布于 2024-12-28 17:44:12 字数 6333 浏览 0 评论 0原文

我正在开发一个包含邮件表格的网站。我正在使用 mootools 1.4.3 库和 formcheck 1.6 .js。所以当我点击按钮时,什么也没有发生。只是刷新页面而已。我喜欢这种形式并且真的很想使用它。我的错在哪里?实际上我想要我的表单,例如 [在此处输入链接描述][1]

SCRIPTS

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
         <link rel="stylesheet" href="lightbox/css/prettyPhoto.css" type="text/css" media="screen" charset="utf-8" />
         <script src="lightbox/js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>         

         <link href="rss/example_ticker.css" rel="stylesheet" type="text/css" />

         <script src="rss/jquery.zrssfeed.min.js" type="text/javascript"></script>
         <script src="rss/jquery.vticker.js" type="text/javascript"></script>

         <script type="text/javascript" src="formcheck/mootools-core-1.4.3.js"></script> 
         <script type="text/javascript" src="formcheck/mootools-more-1.4.0.1.js"></script>
         <script type="text/javascript" src="formcheck/lang/en.js"> </script>
         <script type="text/javascript" src="formcheck/formcheck.js"> </script>
         <script type="text/javascript" src="formcheck/formcheck-yui.js"> </script>
         <link rel="stylesheet" href="formcheck/theme/grey/formcheck.css" type="text/css" media="screen" />

HTML 代码

<div>
        <form id="mailform" method="post" action="#">
<input type="hidden" name="id" value="112" />
<input type="hidden" name="submitted" value="1" />
<input type="hidden" name="L" value="0" />
<div style="width: 480px; margin-left: 60px;">
  <div style="width: 250px; float: left;  padding: 2px;">
  <div style="width: 110px; float: left; font-size: 11px;">AD SOYAD *</div>
  <input name="name" type="text" id="name" class="validate['required','nodigit']" style="float: left; position: relative; width: 130px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="width: 220px; float: left;  padding: 2px;">
  <div style="width: 80px; float: left; font-size: 11px;">TELEFON *</div>
  <input name="area_telefon" type="text" id="area_telefon" class="validate['required','number']" style="float: left; position: relative; width: 40px; background: #d1d2d4; border: solid 1px #7f8082;"/> 
  <input name="telefon" type="text" id="telefon" class="validate['required','number']" style="float: left; position: relative; width: 87px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="width: 250px; float: left;  padding: 2px;">
  <div style="width: 110px; float: left; font-size: 11px;">FiRMA ADI *</div>
  <input name="unternehmen" type="text" id="unternehmen" class="validate['required']" style="float: left; position: relative; width: 130px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="width: 220px; float: left;  padding: 2px;">
  <div style="width: 80px; float: left; font-size: 11px;">FAX *</div>
  <input name="area_telefax" type="text" id="area_telefax" class="validate['number']" style="float: left; position: relative; width: 40px; background: #d1d2d4; border: solid 1px #7f8082;"/> 
  <input name="telefax" type="text" id="telefax" class="validate['number']" style="float: left; position: relative; width: 87px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="width: 250px; float: left;  padding: 2px;">
  <div style="width: 110px; float: left; font-size: 11px;">ADRES *</div>
  <input name="strasse" type="text" id="strasse" class="validate['required']" style="float: left; position: relative; width: 130px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="width: 220px; float: left;  padding: 2px;">  
  <div style="width: 80px; float: left; font-size: 11px;">E-MAiL *</div>
  <input name="email" type="text" id="email" class="validate['required','email']" style="float: left; position: relative; width: 130px; background: #d1d2d4; border: solid 1px #7f8082;"/> 
  </div>

  <div style="width: 250px; float: left;  padding: 2px;">  
  <div style="width: 110px; float: left; font-size: 11px;">POSTA KODU / SEHiR*</div>
  <input name="plz" type="text" class="validate['number']" id="plz" maxlength="5" style="float: left; position: relative; width: 40px; background: #d1d2d4; border: solid 1px #7f8082;"/> 
  <input name="standort" type="text" id="standort" class="validate['required','nodigit']" style="float: left; position: relative; width: 87px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="width: 220px; float: left; padding: 2px;">  
  <div style="width: 80px; float: left; font-size: 11px;">Web Adresi *</div>
  <input name="internet" type="text" id="internet" class="validate['url']" style="float: left; position: relative; width: 130px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="clear:both;">&nbsp;</div>
  <div style="width: 480px; float: left;  padding: 2px;">  
  <div style="width: 110px; float: left; font-size: 11px;">MESAJINIZ: * </div>
  <textarea name="Mitteilung" id="mitteilungen" style="float: left; position: relative; width: 355px; background: #d1d2d4; border: solid 1px #7f8082; height: 100px;" rows="6" cols="50"></textarea> 
  </div>

    <input name="Submit" type="submit" value="Tamam" style="background: no-repeat 15px url(img/3dots.gif) #c2262e; color: #FFFFFF; text-align: center; padding: 5px; float: right; position: relative; margin-right: 10px; border: none;"/>
</div>
<script type='text/javascript'>

    window.addEvent('domready', function () {check = new FormCheck('mailform', {
            display: {
                fadeDuration: 500,
                errorsLocation: 1,
                indicateErrors: 1,
                showErrors: 1
            }
        })
    });
</script>
</form>

    </div>

I am developing a website which includes mailform. I am using mootools 1.4.3 library with formcheck 1.6 .js. So When I click BUTTON, nothing is happening there. It's only refreshing the page. I like this form and really want to use it. Where is my fault? Actually I want my form like [enter link description here][1]

SCRIPTS

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
         <link rel="stylesheet" href="lightbox/css/prettyPhoto.css" type="text/css" media="screen" charset="utf-8" />
         <script src="lightbox/js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>         

         <link href="rss/example_ticker.css" rel="stylesheet" type="text/css" />

         <script src="rss/jquery.zrssfeed.min.js" type="text/javascript"></script>
         <script src="rss/jquery.vticker.js" type="text/javascript"></script>

         <script type="text/javascript" src="formcheck/mootools-core-1.4.3.js"></script> 
         <script type="text/javascript" src="formcheck/mootools-more-1.4.0.1.js"></script>
         <script type="text/javascript" src="formcheck/lang/en.js"> </script>
         <script type="text/javascript" src="formcheck/formcheck.js"> </script>
         <script type="text/javascript" src="formcheck/formcheck-yui.js"> </script>
         <link rel="stylesheet" href="formcheck/theme/grey/formcheck.css" type="text/css" media="screen" />

HTML CODE

<div>
        <form id="mailform" method="post" action="#">
<input type="hidden" name="id" value="112" />
<input type="hidden" name="submitted" value="1" />
<input type="hidden" name="L" value="0" />
<div style="width: 480px; margin-left: 60px;">
  <div style="width: 250px; float: left;  padding: 2px;">
  <div style="width: 110px; float: left; font-size: 11px;">AD SOYAD *</div>
  <input name="name" type="text" id="name" class="validate['required','nodigit']" style="float: left; position: relative; width: 130px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="width: 220px; float: left;  padding: 2px;">
  <div style="width: 80px; float: left; font-size: 11px;">TELEFON *</div>
  <input name="area_telefon" type="text" id="area_telefon" class="validate['required','number']" style="float: left; position: relative; width: 40px; background: #d1d2d4; border: solid 1px #7f8082;"/> 
  <input name="telefon" type="text" id="telefon" class="validate['required','number']" style="float: left; position: relative; width: 87px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="width: 250px; float: left;  padding: 2px;">
  <div style="width: 110px; float: left; font-size: 11px;">FiRMA ADI *</div>
  <input name="unternehmen" type="text" id="unternehmen" class="validate['required']" style="float: left; position: relative; width: 130px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="width: 220px; float: left;  padding: 2px;">
  <div style="width: 80px; float: left; font-size: 11px;">FAX *</div>
  <input name="area_telefax" type="text" id="area_telefax" class="validate['number']" style="float: left; position: relative; width: 40px; background: #d1d2d4; border: solid 1px #7f8082;"/> 
  <input name="telefax" type="text" id="telefax" class="validate['number']" style="float: left; position: relative; width: 87px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="width: 250px; float: left;  padding: 2px;">
  <div style="width: 110px; float: left; font-size: 11px;">ADRES *</div>
  <input name="strasse" type="text" id="strasse" class="validate['required']" style="float: left; position: relative; width: 130px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="width: 220px; float: left;  padding: 2px;">  
  <div style="width: 80px; float: left; font-size: 11px;">E-MAiL *</div>
  <input name="email" type="text" id="email" class="validate['required','email']" style="float: left; position: relative; width: 130px; background: #d1d2d4; border: solid 1px #7f8082;"/> 
  </div>

  <div style="width: 250px; float: left;  padding: 2px;">  
  <div style="width: 110px; float: left; font-size: 11px;">POSTA KODU / SEHiR*</div>
  <input name="plz" type="text" class="validate['number']" id="plz" maxlength="5" style="float: left; position: relative; width: 40px; background: #d1d2d4; border: solid 1px #7f8082;"/> 
  <input name="standort" type="text" id="standort" class="validate['required','nodigit']" style="float: left; position: relative; width: 87px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="width: 220px; float: left; padding: 2px;">  
  <div style="width: 80px; float: left; font-size: 11px;">Web Adresi *</div>
  <input name="internet" type="text" id="internet" class="validate['url']" style="float: left; position: relative; width: 130px; background: #d1d2d4; border: solid 1px #7f8082;"/>
  </div>

  <div style="clear:both;"> </div>
  <div style="width: 480px; float: left;  padding: 2px;">  
  <div style="width: 110px; float: left; font-size: 11px;">MESAJINIZ: * </div>
  <textarea name="Mitteilung" id="mitteilungen" style="float: left; position: relative; width: 355px; background: #d1d2d4; border: solid 1px #7f8082; height: 100px;" rows="6" cols="50"></textarea> 
  </div>

    <input name="Submit" type="submit" value="Tamam" style="background: no-repeat 15px url(img/3dots.gif) #c2262e; color: #FFFFFF; text-align: center; padding: 5px; float: right; position: relative; margin-right: 10px; border: none;"/>
</div>
<script type='text/javascript'>

    window.addEvent('domready', function () {check = new FormCheck('mailform', {
            display: {
                fadeDuration: 500,
                errorsLocation: 1,
                indicateErrors: 1,
                showErrors: 1
            }
        })
    });
</script>
</form>

    </div>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

爱本泡沫多脆弱 2025-01-04 17:44:12

您不能使用服务器控件提交表单,而必须使用 mootool Ajax.Form。或使用 Form.Request 方法。

You can't use server controls to submit a form instead you have to use mootool Ajax.Form. or use Form.Request method.

七分※倦醒 2025-01-04 17:44:12

尝试从标头代码中删除 jquery,检查它是否有效。

Try removing jquery from the header code, check if it will work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文