做爰高潮a片〈毛片〉,尤物av天堂一区二区在线观看,一本久久A久久精品VR综合,添女人荫蒂全部过程av

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關(guān)鍵字專題關(guān)鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當(dāng)前位置: 首頁 - 科技 - 知識(shí)百科 - 正文

JS動(dòng)態(tài)添加的div點(diǎn)擊跳轉(zhuǎn)到另一頁面實(shí)現(xiàn)代碼

來源:懂視網(wǎng) 責(zé)編:小采 時(shí)間:2020-11-27 22:28:38
文檔

JS動(dòng)態(tài)添加的div點(diǎn)擊跳轉(zhuǎn)到另一頁面實(shí)現(xiàn)代碼

JS動(dòng)態(tài)添加的div點(diǎn)擊跳轉(zhuǎn)到另一頁面實(shí)現(xiàn)代碼: div調(diào)用函數(shù)跳轉(zhuǎn): var obj = document.getElementById('id'); obj.onclick=function(){ window.location.href=跳轉(zhuǎn)的地址 rel=external nofollow ; } 源文件: <!DOCTYPE html> <html>
推薦度:
導(dǎo)讀JS動(dòng)態(tài)添加的div點(diǎn)擊跳轉(zhuǎn)到另一頁面實(shí)現(xiàn)代碼: div調(diào)用函數(shù)跳轉(zhuǎn): var obj = document.getElementById('id'); obj.onclick=function(){ window.location.href=跳轉(zhuǎn)的地址 rel=external nofollow ; } 源文件: <!DOCTYPE html> <html>

 div調(diào)用函數(shù)跳轉(zhuǎn):

var obj = document.getElementById('id');
obj.onclick=function(){ 
 window.location.href="跳轉(zhuǎn)的地址" rel="external nofollow" ; 
 }

源文件:

<!DOCTYPE html>
<html>
<head>
 <title>首頁推薦頁面</title>
 <meta name="author" content="Chunna.zheng"/>
 <meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8"/>
 <style type="text/css">
 div.recommendclass {
 width: 100%;
 height: 60px;
 line-height: 60px;
 vertical-align: middle;
 font-size: 18px;
 text-align: center; /*文字水平居中對(duì)齊*/
 background-color: #f5f5f5;
 }
 .mall_contentChild1Class {
 display: inline;
 width: 40%;
 height: 100px;
 background-color: #f5f5f5;
 }
 .mall_contentChild2Class {
 display: inline;
 width: 60%;
 height: 100px;
 float: right;
 position: relative;
 background-color: #f5f5f5;
 }
 .mall_contentChild2BottomClass {
 display: table-cell;
 width: 90%;
 vertical-align: bottom;
 position: absolute;
 left: 5px;
 bottom: 5px;
 background-color: #f5f5f5;
 }
 .mall_Child2TextLeftClass {
 line-height: 16px;
 vertical-align: bottom;
 background-color: #f5f5f5;
 }
 .mall_Child2TextRightClass {
 float: right;
 color: #f3b041;
 font-size: 25px;
 line-height: 26px;
 vertical-align: bottom;
 background-color: #f5f5f5;
 }
 .news_title {
 display: block;
 font-size: 18px;
 vertical-align: center;
 background-color: #f5f5f5;
 }
 .news_message {
 display: block;
 font-size: 14px;
 vertical-align: center;
 background-color: #f5f5f5;
 }
 .news_time {
 display: block;
 font-size: 12px;
 vertical-align: bottom;
 position: absolute;
 bottom: 5px;
 right: 5px;
 background-color: #f5f5f5;
 }
 </style>
</head>
<body style="margin: 0; padding: 0 ">
<div id="mall_news" class="recommendclass">新聞咨訊</div>
<div id="news_content" style="background-color:#f5f5f5"></div>
<script>
 var Shu = 2;
 var df = document.createElement("div");
 for (var i = 0; i <= Shu; i++) {
 var oDiv = document.createElement("div");
 var divChild1 = document.createElement("div");
 divChild1.className = 'mall_contentChild1Class';
 var img = document.createElement("img");
 img.style.width = "130px";
 img.style.height = "100px";
 img.src = 'ic_mall_good_stuff.jpg';
 divChild1.appendChild(img);
 oDiv.appendChild(divChild1);
 var divChild2 = document.createElement("div");
 divChild2.className = 'mall_contentChild2Class';
 var text1 = document.createElement("span");
 text1.className = 'news_title';
 text1.innerHTML = "我是標(biāo)題";
 divChild2.appendChild(text1);
 var bottomDiv = document.createElement("div");
 var textLeft = document.createElement("span");
 textLeft.className = 'news_message';
 textLeft.innerHTML = "我是內(nèi)容";
 bottomDiv.appendChild(textLeft);
 var textRight = document.createElement("span");
 textRight.className = 'news_time';
 textRight.innerHTML = "2017.09.23";
 bottomDiv.appendChild(textRight);
 divChild2.appendChild(bottomDiv);
 oDiv.appendChild(divChild2);
 //添加點(diǎn)擊事件
 oDiv.onclick = function(){
 window.location.href="file:///android_asset/news.html" rel="external nofollow" ;
 }
 df.appendChild(oDiv);
 }
 document.getElementById("news_content").appendChild(df);
</script>
</body>
</html>

總結(jié)

以上所述是小編給大家介紹的JS動(dòng)態(tài)添加的div點(diǎn)擊跳轉(zhuǎn)到另一頁面實(shí)現(xiàn)代碼,希望對(duì)大家有所幫助,如果大家有任何疑問請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!

聲明:本網(wǎng)頁內(nèi)容旨在傳播知識(shí),若有侵權(quán)等問題請(qǐng)及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

JS動(dòng)態(tài)添加的div點(diǎn)擊跳轉(zhuǎn)到另一頁面實(shí)現(xiàn)代碼

JS動(dòng)態(tài)添加的div點(diǎn)擊跳轉(zhuǎn)到另一頁面實(shí)現(xiàn)代碼: div調(diào)用函數(shù)跳轉(zhuǎn): var obj = document.getElementById('id'); obj.onclick=function(){ window.location.href=跳轉(zhuǎn)的地址 rel=external nofollow ; } 源文件: <!DOCTYPE html> <html>
推薦度:
標(biāo)簽: 頁面 點(diǎn)擊 js
  • 熱門焦點(diǎn)

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 平陆县| 阜新| 宁陵县| 隆安县| 韶山市| 莱阳市| 杂多县| 尼勒克县| 江阴市| 祁门县| 紫金县| 鄂伦春自治旗| 封丘县| 大渡口区| 水城县| 开江县| 陕西省| 唐海县| 板桥市| 鲁甸县| 永新县| 静安区| 洞头县| 徐汇区| 弥勒县| 凤阳县| 山丹县| 元阳县| 临邑县| 太仓市| 长宁县| 分宜县| 兴和县| 山丹县| 靖江市| 余姚市| 长寿区| 玉屏| 工布江达县| 三台县| 全椒县|