index.html의 버튼으로 생성 된 이벤트를 수신하는 올바른 방법은 무엇입니까 ?? index.html을에서 :Shiny.OnInputChange - R Shiny를 사용하여 버튼 이벤트 수신
< button class='btn btn-primary btn-custom w-md waves-effect waves-light' id='.loginButton' style='width: 20%' type='button' onclick='myFucntion()'>Log In< /button>
<script type = 'text/javascript'>
function myFunction() {
document.getElementById('.loginButton').style.color = 'red';
Shiny.onInputChange('.loginButton',1)
}</script>
server.R에서 :
observeEvent(input$.loginButton,{print("YEAH")})
내가 아니라 버튼, 입력 필드와 함께 작동하도록 보인다.
왜'''onclick'''가 좋을까요? https://www.rdocumentation.org/packages/shinyjs/versions/0.1.0/topics/onclick – amrrs