javaScript»ñÈ¡Ò³Ã棬ÆÁÄ»µÈ¸ß¶ÈÓë¿í¶È
//»ñÈ¡Ò³ÃæÊý¾Ý
function getPageSize(){
var xScroll, yScroll;
if (window.innerHeight && window.scrollMaxY) {
xScroll = document.body.scrollWidth;
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else{ // Explorer Macwould also work in Explorer 6 Strict, Mozilla and Safari
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}
var windowWidth, windowHeight;
if (self.innerHeight) { // all except Explorer
windowWidth = self.innerWidth;
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { // other Explorers
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
// for small pages with total height less then height of the viewport
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
if(xScroll < windowWidth){
pageWidth = windowWidth;
} else {
 
Ïà¹ØÎĵµ£º
insertAtCurson º¯Êý´úÁ½²ÎÊý·Ö±ðΪ¶ÔÏóºÍÊäÈëµÄ×Ö·û
function insertAtCursor(myField, myValue)
{
if (document.selection)
{
&nb ......
<script type="text/javascript">
window.onbeforeunload=function()
{
alert("onbeforeunload event...");
//return false;
}
</script>
<a href="#" onclick="return true;">²âÊÔ1</a><br/>
<a href="javascript:void(0)" onclick="return true;">²âÊÔ2</a><br/& ......
prototype ÊÇÔÚ IE 4 ¼°ÆäÒÔºó°æ±¾ÒýÈëµÄÒ»¸öÕë¶ÔÓÚijһÀàµÄ¶ÔÏóµÄ·½·¨£¬¶øÇÒÌØÊâµÄµØ·½±ãÔÚÓÚ£ºËüÊÇÒ»¸ö¸øÀàµÄ¶ÔÏóÌí¼Ó·½·¨µÄ·½·¨£¡ÕâÒ»µã¿ÉÄÜÌýÆðÀ´»áÓеãÂÒ£¬±ð¼±£¬ÏÂÃæÎÒ±ãͨ¹ýʵÀý¶ÔÕâÒ»ÌØÊâµÄ·½·¨×÷ÒÑϽ²½â£º
¡¡¡¡Ê×ÏÈ£¬ÎÒÃÇÒªÏÈÁ˽âÒ»ÏÂÀàµÄ¸ÅÄJavaScript ±¾ÉíÊÇÒ»ÖÖÃæÏò¶ÔÏóµÄÓïÑÔ£¬ËüËùÉæ¼°µÄÔªËظù¾ÝÆäÊôÐÔµ ......
ÔÚÏß±à¼ÄÚÈݵÄʱºò£¬ÄÇЩ»ùÓÚ JavaScript µÄ±à¼Æ÷°ïÁËÎÒÃÇ´ó棬ÕâЩËù¼û¼´ËùµÃ£¨WYSIWYG£©±à¼Æ÷£¬¸øÎÒÃÇÌṩÁËÀàËÆ
Office µÄ²Ù×÷ÌåÑé¡£Èç½ñ£¬ÈκÎÍøÕ¾ÄÚÈݹÜÀíϵͳ£¨CMS£©ºÍ²©¿Íϵͳ¶¼ÐèÒªÒ»¸öÕâÑùµÄ±à¼Æ÷¡£±¾Îľ«Ñ¡ÁË10¸ö»ùÓÚ JavaScript
µÄ±à¼Æ÷£¬ËüÃÇÓеÄÊÇ»ùÓÚ jQuery ¿ò¼Ü£¬ÓеãÔò²»ÊÇ¡£
Mar ......
(Ò»).È·ÈÏɾ³ýÓ÷¨:
1. BtnDel.Attributes.Add("onclick","return confirm('"+"È·ÈÏɾ³ý?"+"')");
2. linktempDelete.Attributes["onclick"]="javascript:return confirm('"+"È·ÈÏɾ³ý?"+"');";
3. privat ......