Attach mesh collider with javascript

I need to dynamically attach mesh collider to meshes by script not by unity3d IDE. I have searched the official API manual, but there are no sample codes provided.
How to do so,expecting your answers!!! :smile:

gameObject.AddComponent(MeshCollider);

–Eric

Thanks! :smile: