2011-02-09 10 views
0
내 웹 페이지의

하나는요소 유형 Mootools의 교체

을 다음과 같이 나는 모든 대체 일반 버튼 타입과 varios 형식으로 버튼을 제출할 수 있습니다 여기에

<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로 같은 요소와 다양한 형태를 운반

+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]'>'입력 [type = file]'은 심각하게 unfunny 일 것입니다 :) –