ITeye博客

Jquery常用

java110eye · 2011-07-30 16:24 · JQuery · Web前端 · Markdown

修改样式

if (now == null || now == "" || now == "null") { // 注意字符串"null"
	now = "opt_11";
}
$("#"+now).css("display", "");
$("#img"+now).attr("src","images/index/close.gif");
$("#img"+now).attr("alt","收起");

 

 

1、div

 

 

// 设值
$("#div_id").text('');

// 隐藏
$("#div_id").hide();

 

2、input

 

 

// this
this.value // 取值

// 取值
$("#input_id").val()

 

3、form

 

 

// action
$("form").attr('action','').submit();

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。