我在Windows Azure上部署了我的MVC-3应用程序.但现在,当我通过staging url它请求它时,显示我(抱歉,处理您的请求时出错).现在我想看到完整的错误消息,默认情况下它隐藏了一些安全原因.我知道我们可以通过web.config文件执行此操作.但是怎么样?
还有其他更好的方法来填充数组:
var arr = [];
var i = 0;
$('select').children('option').each( function() {
arr[i++] = $(this).html();
});
Run Code Online (Sandbox Code Playgroud) 我在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的路径,现在为什么会出现这种异常?谁能告诉我这个问题?
我正在使用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事件中不起作用.请帮帮我
我希望将页脚保持在页面底部,同时保持绝对位置,具有以下页面结构:
<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因为这个页脚出现了.这是我的实际问题.
<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?
<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>?
我有一个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中有一个函数:
function test(a, b, c) {
if(typeof b == "undefined")
//do something
//function code
}
Run Code Online (Sandbox Code Playgroud)
现在我想以这样的方式调用这个函数,以便typeof b remains undefined和a & 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)