You want to make a Webflow button directly call a JavaScript function similar to a custom code button. Here's how you can do it:
```javascript
function myCustomFunction() {
// Your function logic here
alert('Button clicked!');
}
```
```javascript
document.getElementById('yourButtonId').addEventListener('click', myCustomFunction);
```
To make a Webflow button trigger a JavaScript function, you need to add a button with an identifiable ID or class, set up the JavaScript function in the custom code section, and link the function to the button using a click event listener. This allows Webflow buttons to mimic custom code button behavior.