title: define function in javascript onbuttonclick
body: <p>Hi How can I define a function on button click in HTML, I tried something like that:</p>
  
  <pre><code>&lt;input type="button" value="sth" onclick="
  &lt;script type="text/javascript"&gt;
  function hello()(
  window.print();
  var z =document.GetElementById('ogog');
  z.inneHTML="hello";
  &lt;script&gt;
  "&gt;
  </code></pre>
  
  <p>I have to define my function here because I have code which generate me a site in which's
  header i can not define javascript function and I want one function on button click.
  this is only an example.
  This is the way it should look like?</p>