AI编程助手
AI免费问答

input取值,该如何解决

  2016-06-13 12:25   885浏览 原创

input取值



    
  
    
  

这个效果

    



    

    

    







    
    
    
    

    
    
  
    
  {if $list or [email protected] neq 0 }
  {foreach from=$list item=item key=index}

    
{if $item.parent_tow_id eq 2}


    
{/if}
{if $item.parent_tow_id eq 1}


    
{/if}
{if $item.parent_tow_id eq 0}


    
{/if}
    

{/foreach}
{else}
 
    
  
{/if}

    
序号 国家 省份 地区 操作
{$index} {$item.country} {$item.province} {$item.name} {$item.country} {$item.name} {$item.name}    
--暂无数据--

    {include file=warning.tpl}


    

点击确定能获取文本框输入的值  有没有可能实现
------解决思路----------------------
onclick='foo()' />
<script><br />function foo() {<br />  var res = [];<br />  var texts = document.getElementsByName("p");<br />  for(var i in texts) res.push(texts[i].value;<br />}<br /></script><br>
res 中就是
声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。