我没有收到来自服务器的JSON类型数据的响应.
我正在使用JSON插件.
jQuery( "#dialog-form" ).dialog({
autoOpen: false,
height: 500,
width: 750,
modal: true,
buttons :{
"Search" : function(){
jQuery.ajax({type : 'POST',
dataType : 'json',
url : '<s:url action="part" method="finder" />',
success : handledata})
}
}
});
var handledata = function(data)
{
alert(data);
}
Run Code Online (Sandbox Code Playgroud)
如果dataType = 'json'我没有得到任何回复,但如果我没有提及任何回复,dataType我将获得该页面的HTML格式.
public String list(){
JSONObject jo = new JSONObject();
try {
Iterator it = findList.iterator();
while(it.hasNext()){
SearchResult part = (SearchResult) it.next();
jo.put("col1",part.getcol1());
jo.put("col2",part.getcol2());
}
log.debug("--------->:"+jo.toString());
} catch (Exception e) {
log.error(e); …Run Code Online (Sandbox Code Playgroud) 打开窗体时,光标在文本框中等待帮助文本.因此,发生了一些验证错误.因此我不想在打开表单时使用焦点,用户必须单击文本并键入文本.但是文本框中的光标没有任何onfocus事件.
if(!$.trim($("#productsTextArea1").val())){
helpTip = "help string ....";
$("#productsTextArea1").val(helpTip);
$("#productsTextArea1").css("color","#999");
$("#productsTextArea1").click(function(event){
if($("#productsTextArea1").val().indexOf("Enter a return")>-1){
$("#productsTextArea1").css("color","black").val("");
}
});
} else {
$("#productsTextArea1").blur();
}
Run Code Online (Sandbox Code Playgroud)
请指教...
我试图单独更改为标题栏颜色.所以我使用了.ui-dialog-titlebar,但它不起作用,所以我尝试使用ui-widght-header,它反映到数据表也..请指教.
//不工作
.ui-dialog-titlebar {
background-color: #F9A7AE;
background-image: none;
color: #000;
}
Run Code Online (Sandbox Code Playgroud)
//工作,但反映到数据表头也..
.ui-widget-header
{
background-color: #99CCFF;
background-image: none;
color: Black;
}
Run Code Online (Sandbox Code Playgroud)
我正在寻找只有颜色的对话框标题栏.请指教.
如何突出显示数据表中的选定行.我在jsfiddle中用jquery代码数据表更新了html.请帮我写css以突出显示不同颜色的选定行.
var oTable = $("#products1").dataTable({
"aaData": newarray,
"bProcessing": true,
"bDeferRender": true,
"bFilter": false,
"bJQueryUI": true,
"bRetrieve": true,
"bPaginate": false,
"bSort": true,
"aaSorting": [[4, "desc"]],
"iDisplayLength": 25,
"aoColumns": [{"sWidth": "100%","sClass": "center","bSortable": false},
{
"sWidth": "150%","sClass": "center","bSortable": false},
{
"sWidth": "150%","sClass": "center","bSortable": false},
{
"sWidth": "150%","sClass": "center","bSortable": false}
],
"aoColumnDefs": [{ "fnRender": function (o, val) {
return o.aData[0];
},
"sClass": "col1","aTargets": [0]
}, {
"fnRender": function (o, val) {
return o.aData[1];
},
"sClass": "col2","aTargets": [1]
}, {
"fnRender": function (o, val) { …Run Code Online (Sandbox Code Playgroud) 我有方法将返回将显示为文本字符串的值.所以我正在做的是转换为ByteArrayInputStream.
public String method() {
inputStream = new ByteArrayInputStream(prod().getBytes());
return method;
}
Run Code Online (Sandbox Code Playgroud)
prod()是一种返回值的方法.它给了我一个错误ByteArrayInputStream cannot be resolved to a type.请指教.
我在datatable中实现了excel导出.已将tabletool引用和SWF放入我的本地工作区.
var oTable = $("#products").dataTable({
"aaData": newarray,
"bProcessing": true,
"bDeferRender": true,
"bFilter": false,
"bRetrieve": true,
"bPaginate": true,
"bJQueryUI": true,
"sPaginationType": "two_button",
"sDom": '<"H"Tfr>t<"F"ip>',
"oTableTools": {
"sSwfPath": "../swf/copy_csv_xls.swf",
"aButtons": [ "xls" ]
},
"bSort": true,
Run Code Online (Sandbox Code Playgroud)
它只是在表头中显示导出选项,但没有动作,什么也没发生.我有什么步骤需要做吗?如果我在没有提及oTableTools的情况下保持空白,打印选项工作正常,所以我的环境运行良好.
请告知我没有做哪一步?
谢谢
我收到的电子邮件地址就像user.q@stackoverflow.com.我想在java中的电子邮件地址的'@'符号前添加字符串.
在电子邮件地址中添加字符串后:user.qzzz@stackoverflow.com.如何在java中的@符号前插入'zzz'字符串?
我在我的数据中有分页,我实现了选定的行突出显示功能...此功能(行突出显示)在第一页中有效,但第二页和第三页不起作用.
我已经更新了jsfiddle中的代码,请查看建议.
var oTable = $("#products").dataTable({
"aaData": [
["one", "two", "three", "four"],
["five", "six", "seven","eight"],
["one", "two", "three", "four"],
["one", "two", "three", "four"],
["one", "two", "three", "four"],
["one", "two", "three", "four"],
["one", "two", "three", "four"]
],
"bProcessing": true,
"bDeferRender": true,
"bFilter": false,
"bJQueryUI": true,
"sPaginationType": "two_button",
"sDom": '<"H"Tfr>t<"F"ip>',
"bRetrieve": true,
"bPaginate": true,
"bSort": true,
"aaSorting": [
[4, "desc"]
],
"iDisplayLength": 5,
"aoColumns": [{
"sWidth": "70%",
"sClass": "center",
"bSortable": false
}, {
"sWidth": "70%",
"sClass": "center",
"bSortable": false
}, {
"sWidth": …Run Code Online (Sandbox Code Playgroud) jquery ×6
java ×3
css3 ×2
datatables ×2
ajax ×1
css ×1
datatable ×1
javascript ×1
json ×1
pagination ×1
struts2 ×1