Enable or Disable the components and scripts of gameobject at run time

hi m new to unity,, my problem is how to enable or disable both scripts and components of gameobject at run time in javascript.. Right now m having 1 gameobject i have added rigidbody component and 1 script to it at run time..please help

component.enabled = false; for example. ie GetComponent("MyScript").enabled = false;

You can't enable/disable rigidbodies; you can only add or destroy them.