How can I AddListenr in ugui's Button onClick in js?

I tried to add a function to onClick,but it’s not work,the code is like:

function action()
{
 print(123);
}

function executeFunc()
{

  btn.GetComponent.().onClick.AddListener(action);

}

and
I tried to use

"btn.GetComponent.().onClick.RemoveAllListeners"

It can’t work,too…

But I really can use

"btn.GetComponent.().onClick.GetPersistentEventCount()"

to get the Count After I Add function in inepector panel

If “btn” type is Button:

import UnityEngine.UI;

public var btn : Button;

function Start() {
	btn.onClick.AddListener(action);
}

function action() {
	print("asd");
}

If “btn” type is GameObject:

import UnityEngine.UI;

public var btn : GameObject;

function Start() {
	btn.GetComponent(UI.Button).onClick.AddListener(action);
}

function action() {
	print("asd");
}