如何在Datatable插件Jquery中创建单选按钮?

时间:2012-03-21 14:54:00

标签: jquery

在这段代码中,我想为followwing Coloumns创建单选按钮? 而且我想在下面的文本框中传递变量,以便当用户输入任何关键字来检查他的帐户时?

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Using JQuery DataTables plugin with AJAX source
    implemented in Java web application</title>
<link href="media/dataTables/demo_page.css" rel="stylesheet"
    type="text/css" />
<link href="media/dataTables/demo_table.css" rel="stylesheet"
    type="text/css" />
<link href="media/dataTables/demo_table_jui.css" rel="stylesheet"
    type="text/css" />
<link href="media/themes/base/jquery-ui.css" rel="stylesheet"
    type="text/css" media="all" />
<link href="media/themes/smoothness/jquery-ui-1.7.2.custom.css"
    rel="stylesheet" type="text/css" media="all" />
<script src="js/jquery-1.7.1.js" type="text/javascript"></script>
<script src="js/jquery.dataTables.js" type="text/javascript"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
$(document).ready(function() {
     $(".Test").show();
     $(".test").hide();
    $("button").click(function(){
    $(".test").show();
    $(".slidingDiv").show();
                        /* $(".test").show();
                        $(".Test").hide();
                    $("button").click(function(){
                            $(".Test").show();
                            $(".slidingDiv").hide();
                        $('.Test').click(function() {
                                            $(".slidingDiv").slideToggle();  */
                                              $('#Administrator_Cd').dataTable(
                                                            {
                                                                "bServerSide" : "true",
                                                                "sAjaxSource" : "http://localhost:8080/strutsdemo/dateAction.do",
                                                                "bProcessing" : true,
                                                                "sPaginationType" : "full_numbers",
                                                                "bJQueryUI" : true,
                                                                "bRetrieve" : true,
                                                                "bDestroy" : true,
                                                                "bAutoWidth" : false,
                                                                "aoColumns" : [
                                                                        {
                                                                            "bSortable" : true
                                                                        },
                                                                        {
                                                                            "bSortable" : true
                                                                        },

                                                                        {
                                                                            "bSortable" : true
                                                                        } ]



                                                            });
                                            });});
</script>
</head>
<body >
<div class = "Test">
Search:<select>
<option selected="selected">Administrator_Nm</option>
<option>Admin_Email_ID</option>
<option>Admin_Fax_phone_Num_Tx</option>

</select>
<select>
<option selected = "selected">starts with </option>
<option>equals</option>
</select>
<input type ="text" />
<button>search</button>
<div class ="test">
<input type = "button" value = "Setedefault"/>
<input type ="button" value ="Add new Account group"/>



<div class="slidingDiv">
<table id="Administrator_Cd" class="display">
<thead>
<tr>

                                <th>Administrator_Nm</th>
                                <th>Admin_Email_ID</th>
                                <th>Admin_Fax_phone_Num_Tx</th>

                            </tr>
                        </thead>
                    </table>
                </div>
            </div>
        </div>

</body>
</html>

0 个答案:

没有答案