小编Kin*_*ong的帖子

如何设置web.config文件以显示完整的错误消息

我在Windows Azure上部署了我的MVC-3应用程序.但现在,当我通过staging url它请求它时,显示我(抱歉,处理您的请求时出错).现在我想看到完整的错误消息,默认情况下它隐藏了一些安全原因.我知道我们可以通过web.config文件执行此操作.但是怎么样?

c# asp.net web-config asp.net-mvc-3

124
推荐指数
3
解决办法
22万
查看次数

如何在jquery中填充数组

还有其他更好的方法来填充数组:

var arr = [];
var i = 0;
$('select').children('option').each( function() {
    arr[i++] = $(this).html();
});
Run Code Online (Sandbox Code Playgroud)

arrays jquery

8
推荐指数
2
解决办法
2万
查看次数

在天蓝色的窗户上找不到路径的一部分

我在windows azure上部署了mvc-3应用程序.在我的应用程序中,我上传文件并将其保存在App_Data/DownloadedTemplates文件夹中.

  var path = Server.MapPath("~App_Data/DownloadedTemplates");
Run Code Online (Sandbox Code Playgroud)

我的应用程序目前正在暂存环境中运行.当我上传文件时,它在浏览器中显示异常:

找不到路径'F:\ sitesroot\0\App_Data\DownloadedTemplates\B.htm_2c77cdfd-c597-4234-bd1e-29ca0a9b8d0e.htm'的一部分.

Server.MapPath用来在服务器上找到App_Data的路径,现在为什么会出现这种异常?谁能告诉我这个问题?

c# azure asp.net-mvc-3

8
推荐指数
1
解决办法
5049
查看次数

$(这个)不起作用

我正在使用ColorPicker插件.我使用以下代码初始化了插件:

$(".colorpic").ColorPicker({
    color: '#0000ff',
    onShow: function (colpkr) {
        $(colpkr).fadeIn(500);
        return false;
    },
    onHide: function (colpkr) {
        $(colpkr).fadeOut(500);
        return false;
    },
    onChange: function (hsb, hex, rgb) {
        $(this).css('backgroundColor', '#' + hex);  <= $(this) not working 
    }
});
Run Code Online (Sandbox Code Playgroud)

现在我的问题是$(this)onchange事件中不起作用.请帮帮我

javascript jquery

7
推荐指数
1
解决办法
199
查看次数

如何将(绝对)页脚保持在底部?

我希望将页脚保持在页面底部,同时保持绝对位置,具有以下页面结构:

<div id="head"> </div> //want to keep its size auto and always on the top (position absolute) 
<div id="body"> </div> //the children of #body have position absolute (keep size auto)
<div id="foot"> </div> //want to keep this at the bottom (just below body , if body size 
                         changes then footer will also change (position absolute)
Run Code Online (Sandbox Code Playgroud)

我怎样才能做到这一点?

编辑

我想我不清楚我的问题,对不起,但我的实际问题是在#main(高度:自动)内容是绝对的,所以这些内容不包括在主的高度(我只是猜测这个)那是为什么主要的高度是0因为这个页脚出现了.这是我的实际问题.

javascript css jquery html5 css3

3
推荐指数
1
解决办法
3391
查看次数

如何找到元素的最后一个子元素?

 <div id="main">
  <div class="1"></div>
  <div class="2"></div>
  <div class="2"></div>
  <div class="3"></div>
  <div class="3"></div>
  <div class="4"></div>
 </div>
Run Code Online (Sandbox Code Playgroud)

我们如何:last-child在jquery中编写一个选择器来查找last div with class 3

html javascript jquery

3
推荐指数
1
解决办法
379
查看次数

选择除一个之外的所有div

<div id="main">
 <div class="a"></div>
 <div class="b"><p>not me</p></div>
 <div class="b"></div>
 <div class="b"></div>
 <div class="c"></div>
</div> 
Run Code Online (Sandbox Code Playgroud)

我们如何编写一个选择器来选择all divs with class b除了谁的孩子<p>not me</p>

javascript jquery jquery-selectors dom-traversal

3
推荐指数
1
解决办法
1712
查看次数

选择textarea jquery中的所有文本

当用户通过jquery打开时,如何选择textarea中的所有文本?

javascript jquery

3
推荐指数
1
解决办法
5276
查看次数

如何触发iframe事件Jquery

我有一个IFRAME,我想从IFRAME的父级触发一个事件(在iframe中):

只是我想要做的一个粗略的例子:

<iframe id="i">
  <div id="test"></div>
  <script>
  $(document).ready(function() {  // Event is binded inside the iframe 

   $("#test").live({ click : function() { alert("hello"); } });
  });
  </script>
</iframe>

<script>
$(document).ready(function() { // Want to trigger it from outside the iframe
 $("#i").contents().find("#test").trigger("click");
});
</script>
Run Code Online (Sandbox Code Playgroud)

javascript iframe jquery

2
推荐指数
1
解决办法
1万
查看次数

使用未定义的值调用javascript函数

我在javascript中有一个函数:

function test(a, b, c) {
    if(typeof b == "undefined")
      //do something 
    //function code
}
Run Code Online (Sandbox Code Playgroud)

现在我想以这样的方式调用这个函数,以便typeof b remains undefineda & c containes值(没有重新排序a,b&c)一样

test("value for a",  what i can pass here so that b type will be undefined, "value for c")
Run Code Online (Sandbox Code Playgroud)

javascript jquery

2
推荐指数
1
解决办法
185
查看次数