2011-02-09 14 views
0
で私のWebページの

つを置き換えるようにここで要素型は、MooToolsは

<form method="post" action="" style="" enctype="application/x-www-form-urlencoded" id="comment-form-1"> 

    <textarea rows="1" cols="45" id="body" name="body" ></textarea> 

    <button class="post-comment-sml" type="submit" id="submit" name="submit"></button> 
</form> 
<form method="post" action="" style="" enctype="application/x-www-form-urlencoded" id="comment-form-2"> 

    <textarea rows="1" cols="45" id="body" name="body" ></textarea> 

    <button class="post-comment-sml" type="submit" id="submit" name="submit"></button> 
</form> 
--- 
<form method="post" action="" style="" enctype="application/x-www-form-urlencoded" id="comment-form-n"> 

    <textarea rows="1" cols="45" id="body" name="body" ></textarea> 

    <button class="post-comment-sml" type="submit" id="submit" name="submit"></button> 
</form> 

など、さまざまなフォームIDの下で同じ要素を持つ複数のフォームを運ぶ

を次のように私はすべてが通常のボタンタイプでVARIOS形式で送信ボタンを置き換えることができます
+2

HTMLにはいくつかの愛が必要です。要素は同じIDを共有できません。 –

答えて

0

document.getElements("button.post-comment-sml").set("type", "button")

<form method="post" action="" style="" enctype="application/x-www-form-urlencoded" id="comment-form-1"> 

    <textarea rows="1" cols="45" id="body" name="body" ></textarea> 

    <button class="post-comment-sml" type="button" id="submit" name="submit"></button> 
</form> 
...あなたのために働いたり、私が何かをしないのですか?

IEの中には、特定のタイプが変更されないことがあります。このケースに影響を与えるがatmを覚えていないが、ショットの価値がある。

+0

私は、IEがパスワード入力(*と*から)への 'type'の変更を止めるだけだと思います。 – gonchuki

+0

'input [type = text、value = c:\ autoexec.bat]'> 'input [type = file]'は真剣にunfunnyです:) –

関連する問題