手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表2010年02月3日的文章

kenai.com即将关闭

说起kenai,那其实是要说很多很多东西的,比如说,netbeans整合了它,比如说他现在属于oracle了,比如说他是一个开源代码库,类似于Sf.net等。

但是,今天上午收到一封邮件说,kenai.com即将关闭了,不再为开源代码库提供服务了。

邮件主题很简单:The Closure of Project Kenai。

邮件内容也很简单:

XML/HTML代码
  1. It's with a sad heart that we have to announce that the Kenai.com domain will be shutdown as part of the consolidation of project hosting sites now that Sun is a wholly owned subsidiary of Oracle.  
  2.   
  3. Project Kenai has always existed as two different things: Kenai the infrastructure, and Kenai the website (Kenai.com).  While it has come time to close the domain of Kenai.com, the infrastructure (which is already used under NetBeans.org) will live on to support other domains in the future.  
然后就是告诉我,该准备一下往其他源代码服务器上迁移,并且提示我可以用subversion等工具把代码拷贝出来。否则。。。唉。

可怜我的sbphp就是放在kenai上面的现在,是全完了。不过反正我也准备重写了,倒也无所谓,只是又少了一个源代码迁入的地方。看来netbeans也需要更新了。期待再次整合一个网站。

Tags: kenai, sbphp

jQuery操作select

jQuery这个框架方便了我们对于HTML元素的操作,本来以为自己对于Select操作也算是熟悉了,但上午在测试的时候才发现自己了解的还真不多。

看了一下jQuery的一些方法后,理出了一些常用的方法,列在下面:

JavaScript代码
  1. //获取第一个option的值  
  2. $('#test option:first').val();  
  3. //最后一个option的值   
  4. $('#test option:last').val();  
  5. //获取第二个option的值  
  6. $('#test option:eq(1)').val();  
  7. //获取选中的值  
  8. $('#test').val();  
  9. $('#test option:selected').val();  
  10. //设置值为2的option为选中状态  
  11. $('#test').attr('value','2');  
  12. //设置第一个option为选中  
  13. $('#test option:last').attr('selected','selected');  
  14. $("#test").attr('value' , $('#test option:last').val());  
  15. $("#test").attr('value' , $('#test option').eq($('#test option').length - 1).val());  
  16. //获取select的长度  
  17. $('#test option').length;  
  18. //添加一个option  
  19. $("#test").append("<option value='9'>ff</option>");  
  20. $("<option value='9'>ff</option>").appendTo("#test");  
  21. //添除选中项  
  22. $('#test option:selected').remove();  
  23. //指定项选中  
  24. $('#test option:first').remove();  
  25. //指定值被删除  
  26. $('#test option').each(function(){  
  27.     if( $(this).val() == '5'){  
  28.         $(this).remove();  
  29.     }  
  30. });  
  31. $('#test option[value=5]').remove();  
  32.   
  33. //获取第一个Group的标签  
  34. $('#test optgroup:eq(0)').attr('label');  
  35. //获取第二group下面第一个option的值   
  36. $('#test optgroup:eq(1) :option:eq(0)').val();  

 

 想来应该够用了吧?呵呵

 

Tags: jquery, select