Javascript not working

i used the javascript code as given in the tutorial …the web page open but buttons were not working …on changing back to pure html it gave correct result in ac bub control experiment.
can u plz tell why this is happening.

Can you share a screenshot of the code that dint work here.

In the dev console (ctrl + shift + N, for chrome) set the debug flag to true by typing
debug = true;
Try and see whats wrong, using the alerts you receive from there.