Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery ui 请让我知道如何在这个jquery代码中添加更新按钮特性 AJAX JSP页面 $(文件) .ready(函数(){ //准备数据 $('jqxTabs') .jqxTabs({ 宽度:550, 身高:150 }); $(“我的按钮”) .jqxButto_Jquery Ui_Jquery_Jqgrid - Fatal编程技术网

Jquery ui 请让我知道如何在这个jquery代码中添加更新按钮特性 AJAX JSP页面 $(文件) .ready(函数(){ //准备数据 $('jqxTabs') .jqxTabs({ 宽度:550, 身高:150 }); $(“我的按钮”) .jqxButto

Jquery ui 请让我知道如何在这个jquery代码中添加更新按钮特性 AJAX JSP页面 $(文件) .ready(函数(){ //准备数据 $('jqxTabs') .jqxTabs({ 宽度:550, 身高:150 }); $(“我的按钮”) .jqxButto,jquery-ui,jquery,jqgrid,Jquery Ui,Jquery,Jqgrid,请让我知道如何在这个jquery代码中添加更新按钮特性 AJAX JSP页面 $(文件) .ready(函数(){ //准备数据 $('jqxTabs') .jqxTabs({ 宽度:550, 身高:150 }); $(“我的按钮”) .jqxButton({ 宽度:“280px”, 高度:'35px', 主题:“深蓝色” }); var input1Val=“”; var input2Val=“”; var input3Val=“”; $(“#输入1”) .keyup(函数(){ input

请让我知道如何在这个jquery代码中添加更新按钮特性

AJAX JSP页面
$(文件)
.ready(函数(){
//准备数据
$('jqxTabs')
.jqxTabs({
宽度:550,
身高:150
});
$(“我的按钮”)
.jqxButton({
宽度:“280px”,
高度:'35px',
主题:“深蓝色”
});
var input1Val=“”;
var input2Val=“”;
var input3Val=“”;
$(“#输入1”)
.keyup(函数(){
input1Val=$(“#input1”)
.val()
myfunction();
});
函数myfunction(){
变量源={
数据类型:“json”,
数据字段:[{
姓名:'姓名',
键入:“字符串”
}, {
姓名:'年龄',
键入:“数字”
}, {
姓名:'性别',
键入:“字符串”
}, {
姓名:'studentId',
键入:“字符串”
}, {
姓名:'家庭地址',
键入:“字符串”
}, {
名称:'区域',
键入:“字符串”
}, {
姓名:'父亲姓名',
键入:“字符串”
}, {
名称:'按钮',
键入:“字符串”
}, ],
id:'id',
url:'callAJax.action?t='+Math.random()+'&name='+input1Val,
async:true,
sortcolumn:'name',
sortdirection:'asc',
};
var dataAdapter=new$.jqx.dataAdapter(源、{
loadComplete:函数(数据){},
loadError:函数(xhr,状态,错误){}
});
$(“jqxgrid”)
.jqxGrid({
宽度:900,
身高:450,
可排序:是的,
可过滤:正确,
阿尔特罗斯:是的,
来源:dataAdapter,
栏目:[{
文本:“名称”,
数据字段:“名称”,
宽度:100,
单元格格式:“c2”
}, {
正文:“年龄”,
数据字段:“年龄”,
宽度:50
}, {
文本:“性别”,
数据字段:“性别”,
宽度:80
}, {
文本:“学生Id”,
数据字段:“studentId”,
宽度:120
}, {
文本:“家庭地址”,
数据字段:“家庭地址”,
宽度:180
}, {
文本:“区域”,
数据字段:“区域”,
宽度:100,
cellsalign:“对”
}, {
文本:“父亲的名字”,
数据字段:“父亲姓名”,
宽度:120
}, {
文本:“打印”,
数据字段:“按钮”,
宽度:100
}, {
文本:“Id”,
数据字段:“id”,
维特
<%@taglib prefix="s" uri="/struts-tags" %>
    <%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
        <%@ taglib prefix="sjg" uri="/struts-jquery-grid-tags" %>
            <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
            <html>

                <head>
                    <title>AJAX JSP PAGE</title>
                    <sj:head jqueryui="true" jquerytheme="redmond" />
                    <link rel="stylesheet" href="/struts2-jquery-grid-showcase-3.5.0/jqwidgets/styles/jqx.base.css"
                    type="text/css" />
                    <link rel="stylesheet" href="/struts2-jquery-grid-showcase-3.5.0/jqwidgets/styles/jqx.darkblue.css"
                    type="text/css" />
                    <script type="text/javascript" src="/struts2-jquery-grid-showcase-3.5.0/scripts/jquery-1.6.2.min.js"></script>
                    <script type="text/javascript" src="/struts2-jquery-grid-showcase-3.5.0/jqwidgets/jqxcore.js"></script>
                    <script type="text/javascript" src="/struts2-jquery-grid-showcase-3.5.0/jqwidgets/jqxdata.js"></script>
                    <script type="text/javascript" src="/struts2-jquery-grid-showcase-3.5.0/jqwidgets/jqxbuttons.js"></script>
                    <script type="text/javascript" src="/struts2-jquery-grid-showcase-3.5.0/jqwidgets/jqxscrollbar.js"></script>
                    <script type="text/javascript" src="/struts2-jquery-grid-showcase-3.5.0/jqwidgets/jqxmenu.js"></script>
                    <script type="text/javascript" src="/struts2-jquery-grid-showcase-3.5.0/jqwidgets/jqxgrid.js"></script>
                    <script type="text/javascript" src="/struts2-jquery-grid-showcase-3.5.0/jqwidgets/jqxgrid.selection.js"></script>
                    <script type="text/javascript" src="/struts2-jquery-grid-showcase-3.5.0/jqwidgets/jqxgrid.filter.js"></script>
                    <script type="text/javascript" src="/struts2-jquery-grid-showcase-3.5.0/jqwidgets/jqxgrid.sort.js"></script>
                    <script type="text/javascript" src="/struts2-jquery-grid-showcase-3.5.0/jqwidgets/jqxdropdownlist.js"></script>
                    <script type="text/javascript" src="/struts2-jquery-grid-showcase-3.5.0/jqwidgets/jqxlistbox.js"></script>
                    <script type="text/javascript" src="/struts2-jquery-grid-showcase-3.5.0/jqwidgets/jqxtabs.js"></script>
                    <script type="text/javascript">
                        $(document)
                            .ready(function () {
                            // prepare the data

                            $('#jqxTabs')
                                .jqxTabs({
                                width: 550,
                                height: 150
                            });

                            $("#myButton")
                                .jqxButton({
                                width: '280px',
                                height: '35px',
                                theme: 'darkblue'
                            });


                            var input1Val = "";
                            var input2Val = "";
                            var input3Val = "";


                            $("#input1")
                                .keyup(function () {

                                input1Val = $("#input1")
                                    .val()
                                myfunction();
                            });


                            function myfunction() {

                                var source = {
                                    datatype: "json",
                                    datafields: [{
                                        name: 'name',
                                        type: 'string'
                                    }, {
                                        name: 'age',
                                        type: 'number'
                                    }, {
                                        name: 'gender',
                                        type: 'string'
                                    }, {
                                        name: 'studentId',
                                        type: 'string'
                                    }, {
                                        name: 'homeAddress',
                                        type: 'string'
                                    }, {
                                        name: 'area',
                                        type: 'string'
                                    }, {
                                        name: 'fathersName',
                                        type: 'string'
                                    }, {
                                        name: 'button',
                                        type: 'string'
                                    }, ],

                                    id: 'id',
                                    url: 'callAJax.action?t=' + Math.random() + '&name=' + input1Val,
                                    async: true,
                                    sortcolumn: 'name',
                                    sortdirection: 'asc',
                                };

                                var dataAdapter = new $.jqx.dataAdapter(source, {
                                    loadComplete: function (data) {},
                                    loadError: function (xhr, status, error) {}
                                });

                                $("#jqxgrid")
                                    .jqxGrid({

                                    width: 900,
                                    height: 450,
                                    sortable: true,
                                    filterable: true,
                                    altrows: true,
                                    source: dataAdapter,
                                    columns: [{
                                        text: 'name',
                                        datafield: 'name',
                                        width: 100,
                                        cellsformat: 'c2'
                                    }, {
                                        text: 'Age',
                                        datafield: 'age',
                                        width: 50
                                    }, {
                                        text: 'Gender',
                                        datafield: 'gender',
                                        width: 80
                                    }, {
                                        text: 'Student Id',
                                        datafield: 'studentId',
                                        width: 120
                                    }, {
                                        text: 'Home Address',
                                        datafield: 'homeAddress',
                                        width: 180
                                    }, {
                                        text: 'Area',
                                        datafield: 'area',
                                        width: 100,
                                        cellsalign: 'right'
                                    }, {
                                        text: 'Fathers Name',
                                        datafield: 'fathersName',
                                        width: 120
                                    }, {
                                        text: 'Print',
                                        datafield: 'button',
                                        width: 100
                                    }, {
                                        text: 'Id',
                                        datafield: 'id',
                                        width: 50
                                    }, ],
                                    gridComplete: function () {

                                        alert("gridcomplete()");
                                    },
                                });

                                $('#events')
                                    .jqxPanel({
                                    width: 300,
                                    height: 80,
                                    theme: theme
                                });

                                $("#jqxgrid")
                                    .bind("sort", function (event) {
                                    $("#events")
                                        .jqxPanel('clearcontent');

                                    var sortinformation = event.args.sortinformation;
                                    var sortdirection = sortinformation.sortdirection.ascending ? "ascending" : "descending";
                                    if (!sortinformation.sortdirection.ascending && !sortinformation.sortdirection.descending) {
                                        sortdirection = "null";
                                    }

                                    var eventData = "Triggered 'sort' event <div>Column:" + sortinformation.sortcolumn + ", Direction: " + sortdirection + "</div>";
                                    $('#events')
                                        .jqxPanel('prepend', '<div style="margin-top: 5px;">' + eventData + '</div>');
                                });



                                $('#clearsortingbutton')
                                    .jqxButton({
                                    height: 25,
                                    theme: theme
                                });
                                $('#sortbackground')
                                    .jqxCheckBox({
                                    checked: true,
                                    height: 25,
                                    theme: theme
                                });
                                // clear the sorting.
                                $('#clearsortingbutton')
                                    .click(function () {
                                    $("#jqxgrid")
                                        .jqxGrid('removesort');
                                });
                                // show/hide sort background
                                $('#sortbackground')
                                    .bind('change', function (event) {
                                    $("#jqxgrid")
                                        .jqxGrid({
                                        showsortcolumnbackground: event.args.checked
                                    });
                                });

                            }

                        });
                    </script>
                </head>

                <body>
                    <center>
                        <br />
                        <button id="button1" name="button">Click to make Jquery Ajax request</button>
                        <br />Populates data here.
                        <br/>
                        <table id="list2"></table>
                        <div id="pager2"></div>
                        <br />
                        <br />
                        <input type="button" name="button" id='myButton' onclick="setStart();"
                        value="Click to make Javascript Ajax request" />
                        <br/>Javascript Ajax call output
                        <br/>
                        <div id="intValueDiv" style="color: red;font-weight: bold"></div>
                        <br/>
                        <br/>
                        <div style="margin-top: 30px;">
                            <input id="resizeButton" type="button" value="Auto Resize Columns" />
                            <br/>
                            <input type="text" id="input1" name="input1" />
                        </div>
                        <br/>
                        <br/>
                        <div id="jqxgrid"></div>
                    </center>
                </body>

            </html>