I need help, there are three buttons in my phtml file , In that page I want to one button is selected by default when the page is load or refresh in Magento 2?
Please try this,
<script type="text/javascript">
$(document).ready(function(){
$("#modal").click();
});
</script>
Add the script in your phtml file,
<script type="text/javascript">
require([
'jquery'
], function($) {
$(document).ready(function(){
$("#buttonId").trigger('click');
});
})'
</script>