本文目錄一覽:
js中點擊「文字」進入鏈接
head
title/title
script type=”text/javascript”
function value_popup()
{
alert(“haha”);
}
/script
/head
body
a href=”javascript:value_popup()”profile update/a
/body
/html
js裡面有什麼方法可以打開一個網頁
script
window.location.href=”新頁地址”; //將本頁替換成新頁面
window.open(“新頁地址”); //彈出一個新頁面
/script
js 點擊文字彈出窗口問題
var text1, text2;
function OpenDiv(_Dw,_Dh,_Desc) {
text1=”好天氣???”;
text2=”好麻煩啊??”;
改成
var text1, text2;
text1=”好天氣???”;
text2=”好麻煩啊??”;
function OpenDiv(_Dw,_Dh,_Desc) {
因為你第一次執行時,text1和text2跟本沒有給賦值。
當第一次點後才賦的值。以後再點當然顯示正常了。
原創文章,作者:小藍,如若轉載,請註明出處:https://www.506064.com/zh-tw/n/301056.html