[html] type="button" > Web

본문 바로가기

사이트 내 전체검색

Web

[html] type="button"

작성일 21-10-24 11:18

페이지 정보

작성자sbLAB 조회 5,529회 댓글 0건

본문

https://stackoverflow.com/questions/61115129/blazor-button-onclick-function-submitting-form 


<button type="button" class="rz-html-editor-button" @onclick=@OnExecute></button> 

HTML from 안에서 <button> 기본타입은 submit 임 ---> 따라서, 별도 폼안에서 button  사용할때는 type="button"



As per spec, <button> elements are by default of type="submit" when placed within a form. Set delete buttons to explicit type="button".

<form>
  type="button" @onclick="(() => ExecuteDelete(file.fileName))">x</button>
</form>

댓글목록

등록된 댓글이 없습니다.

Copyright © 소유하신 도메인. All rights reserved.
PC 버전으로 보기