index.htmlのボタンで生成されたイベントをリスニングする正しい方法は何ですか?私は、入力フィールドではなく、ボタンで動作するようには思えないShiny.OnInputChange - R Shinyでボタンイベントを聴く
observeEvent(input$.loginButton,{print("YEAH")})
:server.Rで
< 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>
:index.htmlをで 。
「onclick'''はなぜですか? https://www.rdocumentation.org/packages/shinyjs/versions/0.1.0/topics/onclick – amrrs