add textbox on click button

hey i just started working on yii and still learning … i want to know how i can do use my js in yii here is a example on what i want to do with yii …pls copy past the code below in any html file and pls help me do the same in yii …




<script type=‘text/javascript’>

function generateRow99() {

var d=document.getElementById(&quot;div99&quot;);

d.innerHTML+=&quot;&lt;p&gt;&lt;label&gt;Telefono :&lt;/label&gt;&lt;input type='text' name='telephone'&gt;&lt;/p&gt;&quot;;





<p><label>Telefono : </label>

<input type="text" name="telephone">


&lt;div id=&quot;div99&quot;&gt;&lt;/div&gt;

&lt;p&gt;&lt;input type=&quot;button&quot; value=&quot;Add&quot; onclick=&quot;generateRow99()&quot;/&gt;&lt;/p&gt;