easyUI 操作

<a href="javascript:void(0)" onclick="locationUrl()">点击 自动加链接</a>

function locationUrl(){
  var url = '***';
  window.location.href  = url;

//easyUI 
<script>
//选中行的值
        function getSelected(){
            var row = $('#tt').datagrid('getSelected');
            if (row){
                alert('Item ID:'+row.itemid+"\nPrice:"+row.listprice);
            }
        }
//所有行的值
        function getSelections(){
            var ids = [];
            var rows = $('#tt').datagrid('getSelections');   //#tt table 下的id 
            for(var i=0; i<rows.length; i++){
                ids.push(rows[i].itemid);
            }
            alert(ids.join('\n'));
        }
    </script>
<a href="#" onclick="getSelected()">GetSelected</a>
        <a href="#" onclick="getSelections()">GetSelections</a>

 

posted @ 2016-11-15 22:57  每天进步一点点!  阅读(287)  评论(0编辑  收藏  举报