首页 > 代码库 > easyUI 操作

easyUI 操作

<a href="javascript:void(0)" onclick="locationUrl()">点击 自动加链接</a>function locationUrl(){  var url = ‘***‘;  window.location.href  = http://www.mamicode.com/url;><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>

 

easyUI 操作