javascript技巧3

字號(hào):


    網(wǎng)頁(yè)傳遞參數(shù)
    location.search();
    可編輯
    obj.contenteditable=true
    執(zhí)行菜單命令
    obj.execcommand
    雙字節(jié)字符
    /[^\x00-\xff]/
    漢字
    /[\u4e00-\u9fa5]/
    讓英文字符串超出表格寬度自動(dòng)換行
    word-wrap: break-word; word-break: break-all;
    透明背景
    <iframe src=1.htm width=300 height=180 allowtransparency></iframe>
    獲得style內(nèi)容
    obj.style.csstext
    html標(biāo)簽
    document.documentelement.innerhtml
    第一個(gè)style標(biāo)簽
    document.stylesheets[0]
    style標(biāo)簽里的第一個(gè)樣式
    document.stylesheets[0].rules[0]
    防止點(diǎn)擊空鏈接時(shí),頁(yè)面往往重置到頁(yè)首端。
    <a href=javascript:function()>word</a>
    上一網(wǎng)頁(yè)源
    asp:
    request.servervariables(http_referer)
    javascript:
    document.referrer
    釋放內(nèi)存
    collectgarbage();
    禁止右鍵
    document.oncontextmenu = function() { return false;}
    禁止保存
    <noscript><iframe src=*.htm></iframe></noscript>