You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

feedback.js 5.5 kB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. (function($){
  2. $.fn.fix = function(options){
  3. var u = navigator.userAgent;
  4. if((u.indexOf('Android') > -1 || u.indexOf('Linux') > -1 ||u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1)){
  5. $("#scrollsidebar").css("display","none");
  6. return;
  7. }
  8. var defaults = {
  9. float : 'right',
  10. minStatue : true,
  11. skin : 'blue',
  12. durationTime : 1000
  13. };
  14. var options = $.extend(defaults, options);
  15. this.each(function(){
  16. //???????
  17. var thisBox = $(this),
  18. closeBtn = thisBox.find('.close_btn' ),
  19. show_btn = thisBox.find('.show_btn' ),
  20. sideContent = thisBox.find('.side_content');
  21. var defaultTop = thisBox.offset().top; //????????top
  22. thisBox.css(options.float, 0);
  23. if(options.minStatue == "true"){
  24. show_btn.css("float", options.float);
  25. sideContent.css('width', 0);
  26. show_btn.css('width', 28);
  27. }
  28. //close
  29. closeBtn.bind("click",function(){
  30. sideContent.animate({width: '0px'},"fast");
  31. show_btn.stop(true, true).delay(300).animate({ width: '28px'},"fast");
  32. cookiesave('minStatue','true','','','');
  33. });
  34. //show
  35. show_btn.bind("click",function() {
  36. $(this).animate({width: '0px'},"fast");
  37. sideContent.stop(true, true).delay(200).animate({ width: '180px'},"fast");
  38. cookiesave('minStatue','false','','','');
  39. });
  40. }); //end this.each
  41. };
  42. })(jQuery);
  43. function f_submit()
  44. {
  45. $("#new_memo").submit();
  46. }
  47. function cookiesave(n, v, mins, dn, path)
  48. {
  49. if(n)
  50. {
  51. if(!mins) mins = 365 * 24 * 60;
  52. if(!path) path = "/";
  53. var date = new Date();
  54. date.setTime(date.getTime() + (mins * 60 * 1000));
  55. var expires = "; expires=" + date.toGMTString();
  56. if(dn) dn = "domain=" + dn + "; ";
  57. document.cookie = n + "=" + v + expires + "; " + dn + "path=" + path;
  58. }
  59. }
  60. function cookieget(n)
  61. {
  62. var name = n + "=";
  63. var ca = document.cookie.split(';');
  64. for(var i=0;i<ca.length;i++) {
  65. var c = ca[i];
  66. while (c.charAt(0)==' ') c = c.substring(1,c.length);
  67. if (c.indexOf(name) == 0){
  68. return c.substring(name.length,c.length);
  69. }
  70. }
  71. return false;
  72. }
  73. $(function(){
  74. var u = navigator.userAgent;
  75. if((u.indexOf('Android') > -1 || u.indexOf('Linux') > -1 ||u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1)){
  76. $("#scrollsidebar").css("display","none");
  77. return;
  78. }
  79. $(".closeSidebar, .hide-side-bar").click(function(){
  80. $(".show_btn").css("display","none");
  81. $("#scrollsidebar").css("display","none");
  82. return false;
  83. });
  84. $("#button1").click(function(){
  85. myTips("反馈成功","success");
  86. });
  87. $("#scrollsidebar").fix({
  88. float: 'right', //default.left or right
  89. minStatue: cookieget('minStatue'),
  90. skin: 'green', //default.gray or blue
  91. durationTime: 600
  92. });
  93. $("#subject").keydown(function(){
  94. var curLength=$("#subject").val().length;
  95. if(curLength>50){
  96. var num=$("#subject").val().substr(0,50);
  97. $("#subject").val(num);
  98. }
  99. else{
  100. $("#textCount").text(50-$("#subject").val().length)
  101. }
  102. }).keyup(function(){
  103. var curLength=$("#subject").val().length;
  104. if(curLength>50){
  105. var num=$("#subject").val().substr(0,50);
  106. $("#subject").val(num);
  107. }
  108. else{
  109. $("#textCount").text(50-$("#subject").val().length)
  110. }
  111. });
  112. });
  113. //var browser={
  114. // versions:function(){
  115. // var u = navigator.userAgent, app = navigator.appVersion;
  116. // return {//移动终端浏览器版本信息
  117. // trident: u.indexOf('Trident') > -1, //IE内核
  118. // presto: u.indexOf('Presto') > -1, //opera内核
  119. // webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
  120. // gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
  121. // mobile: !!u.match(/AppleWebKit.*Mobile.*/)||!!u.match(/AppleWebKit/), //是否为移动终端
  122. // ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
  123. // android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器
  124. // iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, //是否为iPhone或者QQHD浏览器
  125. // iPad: u.indexOf('iPad') > -1, //是否iPad
  126. // webApp: u.indexOf('Safari') == -1 //是否web应该程序,没有头部与底部
  127. // };
  128. // }(),
  129. // language:(navigator.browserLanguage || navigator.language).toLowerCase()
  130. //}
  131. //document.writeln("语言版本: "+browser.language);
  132. //document.writeln(" 是否为移动终端: "+browser.versions.mobile);
  133. //document.writeln(" ios终端: "+browser.versions.ios);
  134. //document.writeln(" android终端: "+browser.versions.android);
  135. //document.writeln(" 是否为iPhone: "+browser.versions.iPhone);
  136. //document.writeln(" 是否iPad: "+browser.versions.iPad);
  137. //document.writeln(navigator.userAgent);

软件技术创新是当今国家整体创新能力的重要基础和发展引擎。近年来,大众参与的软件创新与创业活动已经成为网络时代软件开发和应用的新形态,正在快速改变着全球软件创新模式和软件产业格局。 ...