thinkphp combox 选择后怎么 assign

html-css04

thinkphp combox 选择后怎么 assign,第1张

表单的名称肯定都是一个 这样肯定是最后一个 你要用数组

Jq简单的Combox选择框

传入json数据源来设置下拉框的选项,调用ComboxHandler.SelectedItem()函数来获取选择的值。

演示地址:http://www.pengyaou.com/LegendsZ/Images/FileImage/cirMenu.html

var ComboxHandler={

comboxWidth:200,

comboxHeight:40,

comboxItemHeight:80,

conboxItemShow:false,

comboxItemArray:["HTML5","CSS3","Javascript","Jquery","PHP","ASP.NET","JSP"],

comboxItemNorHeight:0,

Init:function(){

$(".comboxMain").css("width",ComboxHandler.comboxWidth+2+"px")

$(".comBoxText").css({

"width":ComboxHandler.comboxWidth+"px",

"line-height":ComboxHandler.comboxHeight+"Px"

})

for(var i=0i<ComboxHandler.comboxItemArray.lengthi++){

var items=$("<li>"+ComboxHandler.comboxItemArray[i]+"</li>")

items.attr("class","comboxItem")

$(".comboxMain").append(items)

}

$(".comboxItem").click(function(event){

event.stopPropagation()

$(".comBoxText").html($(this).html())

ComboxHandler.comboxHide($(".comboxMain"))

})

$(".comboxItem").css({

"width":ComboxHandler.comboxWidth+"px",

"line-height":ComboxHandler.comboxHeight+"px"

})

ComboxHandler.comboxItemNorHeight=$(".comboxMain").height()

$(".comboxMain").css("height",$(".comBoxText").height()+2+"px")

$(".comBoxText").click(function(){

ComboxHandler.conboxItemShow==false?ComboxHandler.comboxShow($(this).parent()):ComboxHandler.comboxHide($(this).parent())

})

$(document.body).click(

function(){

if(ComboxHandler.conboxItemShow==true){

ComboxHandler.conboxItemShow=false

ComboxHandler.comboxHide($(".comboxMain"))

}

}

)

},

comboxShow:function(target){

$(target).find(".comboxItem").last().css({

"-webkit-border-radius":"0 0 5px 5px",

"-moz-border-radius":"0 0 5px 5px",

"border-radius":"0 0 5px 5px"

})

$(target).animate({height:ComboxHandler.comboxItemNorHeight+"px"},300,function(){ComboxHandler.conboxItemShow=true})

},

comboxHide:function(target){

$(target).animate({height:$(".comBoxText").height()+2+"px"},300,function(){ComboxHandler.conboxItemShow=false})

},

SelectedItem:function(){

return $(".comBoxText").html()

}

}

不能获取样式easyui-combobox的具体值.attr(",除非是这样的样式--这个的值就是red”,"),这样倒是可以.css(":style=“color样式名"#ccLeafType",或者替换现有的样式#ccLeafType",使用jQuery就行了

           public static string constr = @"Provider=Microsoft.Jet.OleDb.4.0Data Source=school1.mdb"

           using (OleDbConnection con = new OleDbConnection(constr))

            {

                con.Open()

                string sql="select * from csscore"

                using(OleDbDataAdapter oda=new OleDbDataAdapter(sql,con))

                {

                    DataTable dt = new DataTable()

                    oda.Fill(dt)

                    dataGridView1.DataSource = dt

                }

            }

  在工具箱拖一个 datagridview控件。用来显示数据。

  string sql 是查询语句,你就改这个。