[html] type="button" > Web/PHP/API

본문 바로가기
사이트 내 전체검색

Web/PHP/API

[html] type="button"

페이지 정보

작성자 sbLAB 댓글 0건 조회 5,324회 작성일 21-10-24 11:18

본문

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>

댓글목록

등록된 댓글이 없습니다.

회원로그인

접속자집계

오늘
412
어제
433
최대
1,279
전체
219,080

그누보드5
Copyright © sebom.com All rights reserved.