如何将wp插件中的javascript包含到网站上的所有页面?

I have a plugin that has js file in its folder.

My main plugin file looks like this:

require('api/myapi.class.php'); // API Library 
require('settings.php'); // Configuration Options
require('register_shortcodes.php');  

How to add a function that will inject js file to all client pages (Not admin pages) I guess I need to use wp_enqueue_script but where should I add it?

wp_enqueue_script("myscript.js");

Try something like:

add_action( 'wp_enqueue_scripts', 'my_plugin_scripts' );

function my_plugin_scripts() {
    wp_enqueue_script( 'myscript', plugins_url().'/plugin_name/js/myscript.js', array('jquery'));
}

This assumes you put your script in the js folder of the plugin folder, and that it depends on jquery.

EDIT:

A user tried to edit my answer, that added no real improvement to my answer. To explain my answer a bit more. You hook to wp_enqueue_scripts which will show the function with the enque script only on the front end, and not in the admin area, which is what the OP wanted, so there is really no need to check if you're on the admin page.