好像没有什么问题啊?把你的代码全部贴出来看,,,
<script language="javascript">function submit()
{
alert('ok');
}function abc()
{
   document.all.Div1.innerHTML="<input type=button name='btn' value='OK' onclick='submit()'>"
}</script>
<input value="get" onclick="abc()" type="button">
<div id='Div1'>
</div>

解决方案 »

  1.   

    <script>
    function show()
    {
      alert('button单击');
    }
    function create()
    {
      document.getElementById('div1').innerHTML="<input type=button name='btn' value='OK' onclick='show()'>"
    }
    </script>
    <body>
    <div id="div1"></div>
    <input type=button onclick="create()" value='创建button'></body>
      

  2.   

    呵呵,这样的
    我的函数名字是close,这个应该是保留字谢谢大家
      

  3.   

    呵呵,这样的
    我的函数名字是close,这个应该是保留字谢谢大家