---
title: "studio 练习"
author: "meviso"
date: "2010-09-13T23:14:54Z"
tags: ["F#"]
categories: ["企业架构"]
slug: "studio"
draft: false
lastmod: "2010-09-15T23:23:27Z"
id: 762511
url: "https://meviso.iteye.com/blog/762511"
---

1.代码格式化（三组快键组合）
ctrl+A     //全选代码
ctrl+K     //格式化
ctrl+F     //格式化

2.
var id="input1"; 
var obj=$('#'+id);

3.
$("dt a").click(function(){
	
			$("dd:visible").slideUp("fast");
			$(this).parent().next().slideDown("fast");
			return false;
});
//一直不明白里面的this，原来this 就是指“dt a",当然是当前的，不是指所有的
"dt a" ，
因为，$("dt a").click(function(){  为多个"dt a"添加了多个重复事件，你点击那一个才是当前的this "dt a"

4.next()

  $("#report tr.odd").click(function(){
     $(this).next("tr").toggle();
//当前对象下的同辈元素的第一个，顺数的第一个，(toggle())如果隐藏的就找开，打开的隐藏。
因为this 代表tr ，所以也可以这样写：  $(this).next().toggle();

