function getOffset(e) { /*e: Mousemove Event*/ if (e.target.offsetLeft == undefined) { /*firefox only*/ e.target = target.parentNode; } var tarPos = getTarPos(e.target); var tarMousePos = { x: window.pageXOffset + e.clientX, y: window.pageYOffset + e.clientY }; var offset = { offsetX: tarMousePos.x - tarPos.x, offsetY: tarMousePos.y - tarPos.y }; return offset; } function getTarPos(el) { var page = { x: 0, y: 0 }; while (el) { page.x += el.offsetLeft; page.y += el.offsetTop; el = el.offsetParent; } return page; }
Public Shared Funciont AA() as string
return xxxxx
End Function
public static string aa()
{
return xxxx
}
Public Shared Sub AA()
......
End Sub
public static void AA()
{
.....
}
Try
xxxxxx
Catch ex As Exception
UW.WU.WriteErrorToLog(ex)
End Try
try
{
xxxxxx
}
catch (Exception ex)
{
tran.Rollback();
}
char[] delimiterChars = { ',' };
foreach (string tags in cbTags.Split(delimiterChars))
{
}
select case AA
case "AA"
xxx
case "BB"
bbb
case else
aaaa
end select
switch (AA) {
case "AA":
xxx();
break;
case "BB":
bbb();
break;
default:
aaaa();
break;
}
<div id="divContent" style="border:1px solid black">ABCDE</div>
--> 寬divContent 的度隨內文變化
<div style="width:1000px"><div id="divContent" style="border:1px solid black">ABCDE</div></div>
--> divContent 的寬度會和父容器相同
<div style="width:1000px"><div id="divContent" style="border:1px solid black; display:inline">ABCDE</div></div>
--> divContent 的寬度會和父容器相同
<input id="Text1" type="text" />
<input id="Button1" onclick="location.href='msnim:chat?contact=' + $('#Text1').val()" type="button" value="談話" />
<a href="msnim:add?contact=MSN帳號">加入我的MSN</a>
<a href="skype://Skype帳號?add">
<img src="/Upload/Article/20120517/20120517025520_0.jpg" alt="加入我的Skype" border="0">
</a>
<a href="skype:Skype帳號?call">
<img src="/Upload/Article/20120517/20120517025520_0.jpg" alt="用Skype打給我吧" border="0" />
</a>
<img src="http://mystatus.skype.com/balloon/Skype帳號" alt="Skype在線狀態" border="0" />
<a href="Skype:Skype帳號?sms">
<img src="/Upload/Article/20120517/20120517025520_0.jpg" border="0" />
</a>
netsh interface tcp show global
netsh interface tcp set global autotuning=disabled
netsh interface tcp set global autotuningl=normal
IIf(X IsNot Nothing, X.qty, 0) --> 會有 Error
If(X IsNot Nothing, X.qty, 0) --> OK
這是 VS2010 的 Bug 嗎 ?
<script type="text/javascript" src="/scripts/jquery.ae.image.resize.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("div._content img").aeImageResize({ width: 250 });
});
</script>
<script type="text/javascript">
$(document).ready(function () {
$(".resizeme").aeImageResize({ width: 450 });
});
</script>