COPY 我這個(gè)到txt.html 打開(kāi)試一下。
<head>
<style>
#draggable { width: 800px; height: 500px; }
iframe{ width: 100%; height: 100%;}
</style>
<html>
<body>
<div>
<iframe id="draggable" src="a.html"></iframe>
</div>
<script type="text/javascript">
var reset = false;
function Resize () {
var doc = document.getElementById("draggable").contentDocument || document.frames["draggable"].document;
var Text=doc.getElementById("test");
//修改大小
if (reset == true) {
Text.style.fontSize='100px';
reset = false;
} else {
Text.style.fontSize='12px';
reset = true;
}
};
</script>
<input type="button" onclick="Resize()" value="Resize" />
</body>
</html>
<html>
<html>
<head>
</head>
<body>
<div id="test">test</div>
<body>
</html>
===============上面這個(gè)是一個(gè)a.html======================
上面框架里的內(nèi)容縮放,
下面是整框架的縮放,
<html>
<body>
<div>
<iframe id="draggable" src="http://www.baidu.com"></iframe>
</div>
<script type="text/javascript">
var reset = false;
function Resize () {
var obj = document.getElementById("draggable");
if (reset == true) {
obj.style.height="400px";
obj.style.width="500px";
reset = false;
} else {
obj.style.height="0px";
obj.style.width="0px";
reset = true;
}
};
</script>
<input type="button" onclick="Resize()" value="Resize" />
</body>
</html>
for(var i=0;i<res.length;i++){
console.log(res[i].id)
}
F12 -> Application -> Storage -> Cookies ,選中 Back 鍵可刪。
別用alert,用console.log。alert會(huì)阻塞后面的代碼執(zhí)行
找到問(wèn)題了,首先運(yùn)行時(shí)瀏覽器有這么個(gè)告警:
[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.
網(wǎng)上搜了一下找到下面的解決辦法:
https://forum.vuejs.org/t/vue...
問(wèn)題是:
This component use the local registration component as the spinners,
and the local registration component was not be pre-compiled when this
component be released, but your project use the Runtime-only build
version of Vue.js, it does not include the template compiler, the
warning will be thrown when the Vue.js try to render a uncompiled
template.So there has a temporary solution to solve it, just change your Vue.js
version from Runtime-only to Runtime + Compiler, simply to do it in
your webpack configurations:
...
resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js'
}
}
...
node端沒(méi)有瀏覽器環(huán)境,所有沒(méi)有document,window這些瀏覽器對(duì)象,只有js可以用,你是怎么獲取網(wǎng)頁(yè)的 ? http或者fs模塊都可以。
讀取網(wǎng)頁(yè)后用正則判斷第一個(gè)img標(biāo)簽,拿到里面的src就可以
你模板的事件綁定語(yǔ)法寫(xiě)錯(cuò)了,(ngSubmit)里面是沒(méi)有ng的,直接(submit)="onSumbit()"這樣就好了
實(shí)例化的 new 一下
var config1 = {};
var config2 = {};
var demo1 = new dragbox(config1, null);
var demo2 = new dragbox(config2, null);沒(méi)能聽(tīng)明白你的意思 只是大概猜了一下 你使用 window.location.protocol + '//' + window.location.host獲取到地址欄的地址 或者你可以使用正則
Javascript中,比如一個(gè)變量a,如果判斷a是不是undefined 不是用: a === "undefined"
而是用typeof a === "undefined"
好多人犯這錯(cuò)誤啊。。
====
感謝樓下提醒,undefined加"" 。。
如果一個(gè)描述符不具有value,writable,get 和 set 任意一個(gè)關(guān)鍵字,那么它將被認(rèn)為是一個(gè)數(shù)據(jù)描述符。如果一個(gè)描述符同時(shí)有(value或writable)和(get或set)關(guān)鍵字,將會(huì)產(chǎn)生一個(gè)異常。 ---------取自MDN原話。
意思大概就是不可能定一個(gè)屬性即可以對(duì)它進(jìn)行正常讀寫(xiě),又可以在它上面架設(shè)一層getter/setter來(lái)進(jìn)行訪問(wèn)改寫(xiě)。
MDN地址 > https://developer.mozilla.org...
手機(jī)碼字,見(jiàn)諒(逃
控制會(huì)員注冊(cè)的顯示隱藏的變量是modal2
當(dāng)你點(diǎn)擊 已有賬號(hào) 立即登錄 時(shí)
把modal2設(shè)為false
因?yàn)榭缬蛳拗票緛?lái)就是瀏覽器策略,用來(lái)防范各種風(fēng)險(xiǎn)。
location? 你指的重定向地址是?
1.方案一,配置路由,設(shè)置首頁(yè)為登錄頁(yè)
2.方案二,在首頁(yè)里做判斷,未登錄跳轉(zhuǎn)到登錄頁(yè)
監(jiān)聽(tīng)history,后面就順理成章了
同一個(gè)微信用戶(hù),同一個(gè)小程序 storage 上限為 10MB。localStorage 以用戶(hù)維度隔離,同一臺(tái)設(shè)備上,A 用戶(hù)無(wú)法讀取到 B 用戶(hù)的數(shù)據(jù)。
已解決,因?yàn)橐胛募袥_突
變量聲明提升了解一下。
使用flex布局吧
北大青鳥(niǎo)APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國(guó)IT技能型緊缺人才,是大數(shù)據(jù)專(zhuān)業(yè)的國(guó)家
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機(jī)構(gòu),是中國(guó)一站式人才培養(yǎng)平臺(tái)、一站式人才輸送平臺(tái)。2014年4月3日在美國(guó)成功上市,融資1
北大課工場(chǎng)是北京大學(xué)校辦產(chǎn)業(yè)為響應(yīng)國(guó)家深化產(chǎn)教融合/校企合作的政策,積極推進(jìn)“中國(guó)制造2025”,實(shí)現(xiàn)中華民族偉大復(fù)興的升級(jí)產(chǎn)業(yè)鏈。利用北京大學(xué)優(yōu)質(zhì)教育資源及背
博為峰,中國(guó)職業(yè)人才培訓(xùn)領(lǐng)域的先行者
曾工作于聯(lián)想擔(dān)任系統(tǒng)開(kāi)發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項(xiàng)目經(jīng)理從事移動(dòng)互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團(tuán)項(xiàng)目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺(tái)面向?qū)ο箝_(kāi)發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫(kù),具有快速界面開(kāi)發(fā)的能力,對(duì)瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁(yè)制作和網(wǎng)頁(yè)游戲開(kāi)發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開(kāi)發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國(guó)Software AG 技術(shù)顧問(wèn),美國(guó)Dachieve 系統(tǒng)架構(gòu)師,美國(guó)AngelEngineers Inc. 系統(tǒng)架構(gòu)師。