如何使用javascript在smarty中放置链接?

时间:2013-09-20 07:48:07

标签: javascript smarty

我是Smarty的新人。所以请告诉我如何从按钮的onclick事件指向另一页。 我在我的(xxxx.tpl)文件中有以下代码。

  <input type="button" style="height:20px;"class="button" value="Back"></td> 

  {literal}
  <script type="java script>
  </script>
  </literal>

我不知道如何重定向页面。我很乐意帮助我。  提前谢谢。

1 个答案:

答案 0 :(得分:-1)

试试这个:

<input type="button" style="height:20px;"class="button" value="Back" onclick="window.location = 'http://the-page-to-redirect-to'"></td> 
相关问题