I have created a custom detail page button(onclick calling Javascript) that is showing in salesforce classic experience but not in lightning experience. I have added the button to the page layout. I don't understand why this is happening. Can some one explain it to me ? There are screenshots of the detail pages :
Lightning:
Classic :