JavaScriptʵÏÖÍøÒ³µÄ·Å´óËõСÒÔ¼°Í϶¯¹¦ÄÜ
ÏîÄ¿ÖÐÓöµ½Ò»ÖÖÇé¿ö£¬¿ª·¢µÄÒ³Ãæ»æÖƳöÀ´µÄͼƬ»òÕßµ×ͼ¶¼±È½Ï´ó£¬³¬¹ýÆÁÄ»´óСÐí¶à¡£ÎªÁ˸ÄÉÆʹÓÃÌåÑ飬ÐèÒª¸øÕâÀàÒ³ÃæÌí¼Ó·Å´ó¡¢ËõСÒÔ¼°Æ½ÒƵŦÄÜ¡£¾¹ýÒ»·¬ËÑË÷ºÍ³¢ÊÔ£¬ÊµÏÖÁËÓйع¦ÄÜ£¬±¸ÍüÈçÏ¡£
JavaScript£º
var zoomRate = 20;//ÿ´Î·ÅËõ±ÈÀýÔöÁ¿
var maxRate = 300;//×î´ó·Å´ó±¶Êý
var minRate = 20;//×îСËõС±¶Êý
var currZoom = 100;//µ±Ç°Ëõ·Å±È
var dvWidth = 200;//¹¹ÔìËõ·ÅtoolbarµÄ¿í¶È
var dvHeight = 30;///¹¹ÔìËõ·ÅtoolbarµÄ¸ß¶È
var cname = '';
//--------------cookie--------------------------//
//½«ÒÔÇ°Ñ¡ÔñµÄzoom´æÈëcookie//
function SetCookie(name, value) {
var exdate = new Date()
exdate.setDate(exdate.getDate() + 30)
document.cookie = name + "=" + escape(value) + ";expires=" + exdate.toGMTString();
// document.cookie = name + "=" + escape(value) + ";";
}
function GetCookie(name) {
if (document.cookie.length > 0) {
var start = document.cookie.indexOf(name + "=")
if (start != -1) {
start = start + name.length + 1
var end = document.cookie.indexOf(";", start)
if (end == -1) end = document.cookie.length
return unescape(document.cookie.substring(start, end))
}
}
return ""
}
//---------------------Zoom------------------------//
function Zoom() {
//ÔÚÒÑÓеÄÒ³Ã涯̬¼ÓÔØdiv£¬ÓÃÀ´·ÅÈ빦Äܿؼþ
var dv = document.createElement('div');
dv.setAttribute('id', 'btnDiv');
dv.style.position = "absolute";
dv.style.display = "block";
dv.style.left = 0;
dv.style.top = 0;
dv.style.width = dvWidth;
dv.style.height = dvHeight;
dv.style.border = "2px inset gray";
dv.style.backgroundColor = "transparent";
dv.innerHTML = "ButtonArea";
document.body.appendChild(dv);
//Ìí¼Ó¹¦Äܿؼþ
var select = '<select id="showZoom" onchange="changeZoom();"><option value="20%">20%</option><option value="40%">40%</option><option value="60%">60%</option><option value="80%">80
Ïà¹ØÎĵµ£º
ÓÉÓÚÏîÄ¿ÐèÒª£¬Óõ½ÆäËûÏîÄ¿×éÓÃVC¿ª·¢µÄ×é¼þ£¬ÔÚwebºǫ́´úÂëÎÞ·¨·ÃÎÊÕâ¸ö×é¼þ£¬ËùÒÔÖ»ºÃͨ¹ýºǫ́µ÷ÓÃǰ̨µÄjavascript£¬´Ó¶ø²Ù×÷Õâ¸ö×é¼þ¡£ÔÚÍøÉÏÕÒÁËÕÒ£¬·¢ÏÖÓÐÈýÖÖ·½·¨¿ÉÒÔ·ÃÎʵ½Ç°Ì¨´úÂ룺
µÚÒ»ÖÖ£¬OnClientClick (vs2003²»Ö§³ÖÕâ¸ö·½·¨)
<asp:Button ID="Button1" runat="se ......
flex ºÍjavascript»¥Ïàµ÷Óá£
Ò»¡¢flex µ÷ÓÃjavascript
Ö»ÐèʹÓþ²Ì¬µÄExternalInterface.call¾Í¿ÉÒÔÁË¡£
call ·½·¨ÖÁÉÙÒªÇóÒ»¸ö²ÎÊý£¬¾ÍËùµ÷ÓöÊýµÄÃû³Æ¡£
Ò²¿ÉÒÔ´«µÝ²ÎÊý¡£
È磺
ExternalInterface.call("alert","hello");
"hello"¾ÍÊÇ×÷Ϊalertµ ......
¾¡¹Ü JavaScript ÀúÊ·ÉÏʹÓÃÈß³¤¶øÁîÈËÉúÑáµÄ´úÂë¿éÀ´±êµÄÌض¨ä¯ÀÀÆ÷µÄʱÆÚÒѾ½áÊøÁË£¬µ«ÊÇż¶ûʹÓÃһЩ¼òµ¥µÄ´úÂë¿éºÍ¶ÔÏó¼ì²âÀ´È·±£Ò»Ð©´úÂëÔÚÓû§»úÆ÷ÉÏÕý³£¹¤×÷ÒÀÈ»ÊDZØÒªµÄ¡£
ÕâƪÎÄÕÂÖУ¬ÎÒ»áÂÔÊöһϠInternet Explorer ºÍ Firefox ÔÚ JavaScript Óï·¨Éϲ»Í¬µÄ¼¸ ¸ö·½Ãæ¡£
......
/**
* 6 ¼¶Ç¿¶ÈÉèÖã¨Êý×Ö¡¢´óд×Öĸ¡¢Ð¡Ð´×Öĸ¡¢ÌØÊâ×Ö·û¡¢³¤¶È>=6¡¢³¤¶È>=10£©
* Èç¹ûÃÜÂëΪ¿Õ£¬·µ»Ø 0
*/
function __pwdStrength(pwd) {
var sum = [0, 0, 0, 0];
for (var i=0; i<pwd.length; i++) {
& ......
ÔÚÃæÏò¶ÔÏó±à³ÌÓïÑÔÖУ¬¶ÔÓÚthis¹Ø¼ü×ÖÎÒÃÇÊǷdz£ÊìϤµÄ¡£±ÈÈçC++¡¢C#ºÍJavaµÈ¶¼ÌṩÁËÕâ¸ö¹Ø ¼ü×Ö£¬ËäÈ»ÔÚ¿ªÊ¼Ñ§Ï°µÄʱºò¾õµÃ±È½ÏÄÑ£¬µ«Ö»ÒªÀí½âÁË£¬ÓÃÆðÀ´ÊǷdz£·½±ãºÍÒâÒåÈ·¶¨µÄ¡£JavaScriptÒ²ÌṩÁËÕâ¸öthis¹Ø¼ü×Ö£¬²»¹ýÓÃÆðÀ´¾Í±È ¾µäOOÓïÑÔÖÐÒª"»ìÂÒ"µÄ¶àÁË¡£
ÏÂÃæ¾ÍÀ´¿´¿´£¬ÔÚJavaScriptÖи÷ÖÖ ......