2016-10-04 10 views
-1

私はどちらのフィールドでもenterを押してフォームを投稿するとログインボタンを取得しようとしていますが、ボタンは表示されますが何も表示されません。ここにコードはありますか? ありがとうございました!Weeblyのボタンが壊れた

<div><form id="login" action="" method="POST"> 
<div id="login-form-parent" class="wsite-form-container" style="margin-top: 0px;margin-right: 0px; margin"> 
<h2 class="wsite-content-title" style="text-align: center;"> 
<span style="font-size: large;">Please enter your credentials</span></h2> 
<div> 
<div style= "text-align: center";> 
<label class="wsite-form-label" for="name">Username</label> 
<div> 
<input id="input-616817079299148233" class="wsite-form-input wsite-input wsite-input-width-370px" name="username" type="text" /> 
</div> 
</div> 
</div> 
<div style="margin-top: 15px;margin-bottom: 15px;"></div> 
<div> 
<div style="text-align: center";> 
<label class="wsite-form-label" for="password">Password</label> 
<div> 
<input id="input-984837360768012607" class="wsite-form-input wsite-input wsite-input-width-370px" name="pwd" type="password" /> 
</div> 
</div> 
</div> 
</div> 
<div style="display: none; visibility: hidden;"><input name="wsite_subject" type="text" /> 
</div> 
<div style="text-align: center; margin-top: 10px; margin-bottom: 0px;"> 
<input name="form_version" type="hidden" value="2" /> 
<input id="wsite-approved" name="wsite_approved" type="hidden" value="approved" /> 
<input name="ucfid" type="hidden" value="login" /> 
<input style="position: absolute; top: 0; left: -9999px; width: 1px; height: 1px;" type="submit" /> 
<a class="wsite-button"> 
<span class="wsite-button-inner">Submit</span></a></div> 
</form></div> 

答えて

1

アクションはフォームにリンクされていません。action = ""あなたのログインをPHPページにリンクしてください。

+0

ログインスクリプトがまったく動作しないようにしませんか?私は現在、ボタンを使用しないでログインすることができます。 – knightmarh

+0

どのように可能ですか、あなたにログインするためのPHPコードには添付されていないフォームを使用しています。 –

+0

PHPスクリプトは、フォームの詳細、ボタンのアイデアをキャプチャしますか? – knightmarh

0

<input type="sumbmit">をトリガするには、.wsite-button-innerのjQueryを使用するハンドラが必要です。入力ボタンを画面外に隠してしまったからです。 Javaスクリプトを使用してそれを処理する場合、JavaScriptの検証(コードには表示されていません)を追加するのが最善の方法です。

例:document.getElementById("login").submit();

又は

function submitform() 
 
{ 
 
    document.login.submit(); 
 
}
<div><form id="login" action="" method="POST"> 
 
<div id="login-form-parent" class="wsite-form-container" style="margin-top: 0px;margin-right: 0px; margin"> 
 
<h2 class="wsite-content-title" style="text-align: center;"> 
 
<span style="font-size: large;">Please enter your credentials</span></h2> 
 
<div> 
 
<div style= "text-align: center";> 
 
<label class="wsite-form-label" for="name">Username</label> 
 
<div> 
 
<input id="input-616817079299148233" class="wsite-form-input wsite-input wsite-input-width-370px" name="username" type="text" /> 
 
</div> 
 
</div> 
 
</div> 
 
<div style="margin-top: 15px;margin-bottom: 15px;"></div> 
 
<div> 
 
<div style="text-align: center";> 
 
<label class="wsite-form-label" for="password">Password</label> 
 
<div> 
 
<input id="input-984837360768012607" class="wsite-form-input wsite-input wsite-input-width-370px" name="pwd" type="password" /> 
 
</div> 
 
</div> 
 
</div> 
 
</div> 
 
<div style="display: none; visibility: hidden;"><input name="wsite_subject" type="text" /> 
 
</div> 
 
<div style="text-align: center; margin-top: 10px; margin-bottom: 0px;"> 
 
<input name="form_version" type="hidden" value="2" /> 
 
<input id="wsite-approved" name="wsite_approved" type="hidden" value="approved" /> 
 
<input name="ucfid" type="hidden" value="login" /> 
 
<input style="position: absolute; top: 0; left: -9999px; width: 1px; height: 1px;" type="submit" /> 
 
<a href="javascript: submitform()" class="wsite-button"> 
 
<span class="wsite-button-inner">Submit</span></a></div> 
 
</form></div>

インラインHTML:

<div><form id="login" action="" method="POST"> 
 
<div id="login-form-parent" class="wsite-form-container" style="margin-top: 0px;margin-right: 0px; margin"> 
 
<h2 class="wsite-content-title" style="text-align: center;"> 
 
<span style="font-size: large;">Please enter your credentials</span></h2> 
 
<div> 
 
<div style= "text-align: center";> 
 
<label class="wsite-form-label" for="name">Username</label> 
 
<div> 
 
<input id="input-616817079299148233" class="wsite-form-input wsite-input wsite-input-width-370px" name="username" type="text" /> 
 
</div> 
 
</div> 
 
</div> 
 
<div style="margin-top: 15px;margin-bottom: 15px;"></div> 
 
<div> 
 
<div style="text-align: center";> 
 
<label class="wsite-form-label" for="password">Password</label> 
 
<div> 
 
<input id="input-984837360768012607" class="wsite-form-input wsite-input wsite-input-width-370px" name="pwd" type="password" /> 
 
</div> 
 
</div> 
 
</div> 
 
</div> 
 
<div style="display: none; visibility: hidden;"><input name="wsite_subject" type="text" /> 
 
</div> 
 
<div style="text-align: center; margin-top: 10px; margin-bottom: 0px;"> 
 
<input name="form_version" type="hidden" value="2" /> 
 
<input id="wsite-approved" name="wsite_approved" type="hidden" value="approved" /> 
 
<input name="ucfid" type="hidden" value="login" /> 
 
<input style="position: absolute; top: 0; left: -9999px; width: 1px; height: 1px;" type="submit" /> 
 
<a href="javascript: submitform()" class="wsite-button"> 
 
<span class="wsite-button-inner">Submit</span></a></div> 
 
</form></div> 
 
<script type="text/javascript"> 
 
function submitform() 
 
{ 
 
document.login.submit(); 
 
} 
 
</script>