51社区在线成人免费视频,国内精品久久久久久久久电影网,国内精品久久久久久久久电影网 http://www.lalz.net 你的IT之家,站長網(wǎng)絡(luò)技術(shù)學(xué)習(xí)、網(wǎng)站賺錢方法交流之家 Sun, 12 Dec 2021 10:34:55 +0000 zh-Hans hourly 1 https://wordpress.org/?v=6.8.1 [js]教程把表單內(nèi)輸入的中文逗號(hào)自動(dòng)轉(zhuǎn)換為英文 http://www.lalz.net/3389.html http://www.lalz.net/3389.html#respond Sun, 12 Dec 2021 10:34:55 +0000
  核心提示:把表單內(nèi)用戶輸入的中文逗號(hào)即全角字符轉(zhuǎn)換為英文逗號(hào)即半角符號(hào),需要使用客戶端腳本語言javascript來實(shí)現(xiàn),請(qǐng)看下面的代碼://將中文逗號(hào)轉(zhuǎn)換為英文逗號(hào) str:待替換的字符function ReplaceDot(str){ var Obj=document.getElementById(str…

把表單內(nèi)用戶輸入的中文逗號(hào)即全角字符轉(zhuǎn)換為英文逗號(hào)即半角符號(hào),需要使用客戶端腳本語言javascript來實(shí)現(xiàn),請(qǐng)看下面的代碼:

//將中文逗號(hào)轉(zhuǎn)換為英文逗號(hào) str:待替換的字符
function ReplaceDot(str)
{
    var Obj=document.getElementById(str);
    var oldValue=Obj.value;
    while(oldValue.indexOf(",")!=-1)//尋找每一個(gè)中文逗號(hào),并替換
    {
        Obj.value=oldValue.replace(",",",");
        oldValue=Obj.value;
    }
}
把這段代碼放到JS文件內(nèi),在頁面內(nèi)調(diào)用該JS文件,或把這段JS寫在當(dāng)前頁面內(nèi),然后在需要使用的INPUT或textarea內(nèi)放上這句代碼

onKeyUp="ReplaceDot('XXXX')"
其中XXXX為input或textarea的name值

]]>
http://www.lalz.net/3389.html/feed 0
精品JS代碼大全 http://www.lalz.net/3387.html http://www.lalz.net/3387.html#respond Sun, 12 Dec 2021 10:34:54 +0000 1. oncontextmenu="window.event.returnvalue=false" 將徹底屏蔽鼠標(biāo)右鍵
<table border oncontextmenu=return(false)><td>no</table> 可用于Table

2. <body onselectstart="return false"> 取消選取、防止復(fù)制

3. onpaste="return false" 不準(zhǔn)粘貼

4. oncopy="return false;" oncut="return false;" 防止復(fù)制

5. <link rel="Shortcut Icon" href="favicon.ico"> IE地址欄前換成自己的圖標(biāo)

6. <link rel="Bookmark" href="favicon.ico"> 可以在收藏夾中顯示出你的圖標(biāo)

7. <input style="ime-mode:-Disabled"> 關(guān)閉輸入法

8. 永遠(yuǎn)都會(huì)帶著框架
<script language="javascript"><!–
if (window == top)top.location.href = "frames.htm"; //frames.htm為框架網(wǎng)頁
// –></script>

9. 防止被人frame
<SCRIPT LANGUAGE=javascript><!–
if (top.location != self.location)top.location=self.location;
// –></SCRIPT>

10. 網(wǎng)頁將不能被另存為
<noscript><iframe src=*.html></iframe></noscript>

11. <input type=button value=查看網(wǎng)頁源代碼
onclick="window.location = `view-source:`+ http://www.51<img src="圖片的路徑" onmouseout=stoprattle(this) onmouseover=init(this);rattleimage() class=shakeimage> ]]> http://www.lalz.net/3387.html/feed 0 [JS教程]鼠標(biāo)移動(dòng),背景變色 http://www.lalz.net/3388.html http://www.lalz.net/3388.html#respond Sun, 12 Dec 2021 10:34:54 +0000 <style>
.first {background:#666;}
.gray {background:red;}
</style>
<div class="first" onmouSEOver="this.className='gray'" onmouSEOut="this.className='first'">
www.lalz.net
</div>

]]>
http://www.lalz.net/3388.html/feed 0