how do i place a javascript on a single site of my wordpress website? I just read, that could be achieved using the function add_action('wp_head', 'function'); But in some way this does not work with me.

Interesting help! phpheini

produce a function inside your functions.php file (inside your theme) after which add. For instance,

function my_custom_javascript{
print("<script language = 'javascript'>alert('trying my javascript alerts');</script>");
)
add_action('wp_head', 'my_custom_javascript');