この記事は、Dreamweaver でよく使用されるコードをまとめたものです。必要な方は参考にしていただければ幸いです。
Dreamweaver でよく使用されるコード:
1. 水平および垂直スクロール バーの表示と非表示を制御します。
<body style="overflow-y:hidden"> 去掉x轴 <body style="overflow-x:hidden"> 去掉y轴 <body scroll="no">不显
2。テーブルの色が変わります。
<TD onmouseover="this.style.backgroundColor='#FFFFFF'" onmouseout="this.style.backgroundColor=''" style="CURSOR: hand">
3。マウスをドラッグして [普通] を選択します。 iframe ページ
<body ondragstart=window.event.returnValue=false oncontextmenu=window.event.returnValue=false onselectstart=event.returnValue=false>
5. iframe アダプティブ高さ
<iframe name="name" src="main.htm" width="450" height="287" scrolling="Auto" frameborder="0"></iframe>
6. IE のアドレス バーを独自のアイコンに変更し、お気に入りにアイコンを表示できるようにします。
<iframe name="pindex" src="index.asp" frameborder=false scrolling="auto" width="100%" height="100%" frameborder=no onload="document.all['pindex'].style.height=pindex.document.body.scrollHeight"></iframe>7. フォント サイズのスケーリング
オンラインで多くの時間を費やす人が増えており、メガネの人気も高まっています。より多くのユーザーが利用できるように、テキストを大きくします。もっとはっきりと読んでください。
<link rel="Shortcut Icon" href="favicon.ico"> <link rel="Bookmark" href="favicon.ico">8. 単純なジャンプ Web ページ コード
<script type="text/javascript"> function doZoom(size) {document.getElementById('zoom').style.fontSize=size+'px';} </script> <span id="zoom">需要指定大小的文字</span> <a href="javascript:doZoom(16)">大</a> <a href="javascript:doZoom(14)">中</a> <a href="javascript:doZoom(12)">小</a>9.iframe (埋め込みフレーム) 適応高さ
埋め込まれたアドレスは同じページ内にある必要がありますそうでない場合は、「アクセスが拒否されました!」というメッセージが表示されます。クロスドメイン参照には権限の問題があります。他の情報を確認してください。
<meta http-equiv="refresh" content="3; url=http://www.php.cn">10. ジャンプ メニュー新しいウィンドウ
<iframe name="guestbook" src="gbook/index.asp" scrolling=no width="100%" height="100%" frameborder=no onload="document.all['guestbook'].style.height=guestbook.document.body.scrollHeight"></iframe>11.フラッシュ透明オプション
<select name="select" onchange="window.open(this.options[this.selectedIndex].value)"> <option value="http://www.microsoft.com/ie"> Internet Explorer</option> <option value="http://www.microsoft.com"> Microsoft Home</option> <option value="http://msdn.microsoft.com"> Developer Network</option> </select>12.お気に入りと設定に追加ホーム ページ
<param name="wmode" value="transparent">13。Web ページ
<a href=# onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('设为首页" _href="http://www.php.cn/');">设为首页</a> <a href="javascript:window.external.AddFavorite('http://www.php.cn/','php中文网')">收藏本站</a>14 の最終変更時刻を記録して表示します。 ホリデー カウントダウン
<script language=JavaScript> document.write("最后更新时间: " + document.lastModified + "") </script>15 を HEAD
Disable Caching
<Script Language="JavaScript"> var timedate= new Date("October 1,2002"); var times= "国庆节"; var now = new Date(); var date = timedate.getTime() - now.getTime(); var time = Math.floor(date / (1000 * 60 * 60 * 24)); if (time >= 0) document.write( "现在离"+times+"还有: "+time +"天") </Script>16 に追加します。 IFRAME フレーム内のドキュメントの背景を透明にします。
<meta http-equiv="Expires" CONTENT="0"> <meta http-equiv="Cache-Control" CONTENT="no-cache"> <meta http-equiv="Pragma" CONTENT="no-cache">18 を追加します。スクロール
<iframe src="about:<body style='background:transparent'>" allowtransparency></iframe>17.打开窗口即最大化 <script language="JavaScript"> <!-- Begin self.moveTo(0,0) self.resizeTo(screen.availWidth,screen.availHeight) // End --> </script>20 をクリックしたときにページが先頭にリセットされないようにします。空のリンク
コード「javascript:void(null)」は、元の「#」マークを置き換えます
21 テキストまたは画像が指定されたサイズのウィンドウにポップアップ表示されます。
#
<bgsound src="mid/windblue[1].mid" loop="-1"> 只适用于IE <embed src="music.mid" autostart="true" loop="true" hidden="true"> 对Netscape ,IE 都适用# を本文 ##ポップアップ コード
<marquee direction=up height=146 onmouseout=start() onmouseover=stop() scrollAmount=2>滚动信息</marquee>22 に追加します。 細い線の区切り記号
<script language="JavaScript" type="text/JavaScript"> function MM_openBrWindow(theURL,winName,features) {window.open(theURL,winName,features);} </script>
24。 ##rree が完了しました。完全なのは、ie6 に自動的に表示される画像ツールバーを削除し、GALLERYIMG 属性を false または no に設定することです。
26. ページ テキストを選択できないようにします。
<a href="#" target="_self" onClick="MM_openBrWindow('windows01.htm','','width=550,height=380')" width="550" height="380" border="0">图片或文字</a>27。右クリックしたり、CTRL A を使用したり、コピーすることはできません。
<meta http-equiv="refresh" content="5;url=http://www.php.cn/">
28.IE ブラウザは、背景のスクロールを防ぐことができる Body プロパティ bgproperties をサポートしています:
<hr noshade size=0 color=#C0C0C0>
29 背景画像をランダムに変換します (気分をリフレッシュできる特殊効果)
<td style="word-break:break-all">30。画像フォームボタン
style="table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word"31. 左右の影背景のCSS定義方法
<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()">##32. リンク上にマウスを移動させます。 layer
<body oncontextmenu="window.event.returnValue=false" onkeypress="window.event.returnValue=false" onkeydown="window.event.returnValue=false" onkeyup="window.event.returnValue=false" ondragstart="window.event.returnValue=false" onselectstart="event.returnValue=false"> </body>
34. Script
<Body Background="图片文件" bgproperties="fixed">35 のウィンドウを閉じます。テキストが長すぎる場合は、長い部分が省略記号に変換されて表示されます。
<Script Language="JavaScript"> image = new Array(4); //定义image为图片数量的数组 image [0] = 'tu0.gif' //背景图象的路径 image [1] = 'tu1.gif' image [2] = 'tu2.gif' image [3] = 'tu3.gif' image [4] = 'tu4.gif' number = Math.floor(Math.random() * image.length); document.write("<BODY BACKGROUND="+image[number]+">"); </Script>
36. ホームページに入ると自動的に最大化
<form id="form1" name="form1" method="post" action=""> <img src="/static/imghwm/default1.png" data-src="login.gif" class="lazy" style="max-width:90%" style="max-width:90%" onclick="document.form1.submit()" / alt="Dreamweaver でよく使用されるコードのまとめ" > </form>
37. 凹んだテキスト
body { text-align:center; background-repeat: repeat-y; background-position: center; background-image: url(../images/bg.jpg); }
どうですか、私は凹んでいますか?
style="cursor:hand"
38。コードボックス
<div id="Layer1"></div> <a href="#" onClick="Layer1.style.display='none'">关闭层</a>
39を実行します。テーブル
<a href=javascript:close()>[关闭窗口]</a>
40をリンクします。 -up ウィンドウ 常に一番上に表示
<DIV STYLE="width: 120px; height: 50px; border: 1px solid blue;overflow: hidden; text-overflow:ellipsis"> <NOBR>就是比如有一行文字,很长,表格内一行显示不下.</NOBR> </DIV>42。戻る&ウィンドウを閉じる
戻る: javascript:history.back(1)
閉じる: javascript:window.close(); テーブルは透明です
<script> self.moveTo(0,0) self.resizeTo(screen.availWidth,screen.availHeight) </script>
44. 他の人があなたの Web ページをフレームに入れるのを防ぐ方法
<div style="width:300px;padding:20px;overflow:hidden;word-wrap:break-word;word-break:break:all; font-size:12px; line-height:18px; background-color:#eeeeee;"><font disabled>
45 Alt と Title
alt の違いは、次の目的で使用されます。写真のヒント。タイトルは、リンク テキストまたは通常のテキストのヒントを提供するために使用されます。
<a href="http://www.lenvo.cn/">www.lenvo.cn</a></font> </div>46. すべての JavaScript 呼び出しには外部呼び出しを使用してください。
<script> function Preview() {var TestWin=open(''); TestWin.document.write(code.value);} </script> <textarea id=code cols=60 rows=15></textarea> <br> <button onclick=Preview() >运行</button>47 へのリンク。
a:link はリンクのスタイルを表します
a:active は現在アクティブな接続のスタイルを表します
a:hover はマウスが上に移動したときのスタイルを表します
#「link-visited-hover-active」は「lvha」と省略され、「love」「hate」
49 にさまざまなテキスト リンク効果を持つスタイルを設定します。同じページ
<table width="100%" onclick="window.open('http://www.makewing.com/', '_blank')" style="CURSOR:hand"> <tr> <td height="100" bgcolor="f4f4f4"> </td> </tr> </table>
50。ドロップダウン ジャンプ メニュー
.shadowfont{FILTER: dropshadow(color=#666666, offx=1, offy=1, positive=1); FONT-FAMILY: "宋体"; FONT-SIZE: 9pt;COLOR: #ffffff;}
51. div をブロックする解決策を選択します。
次のコードを div に追加し、必要に応じて調整してください。
style="FILTER: alpha(opacity=72)"
52。ページ全体のリンクはすべて _blank です。新しいウィンドウが開きます。
<script language=“javascript”><!--if (self!=top){top.location=self.location;} -->< /script>
以上がDreamweaver でよく使用されるコードのまとめの詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

AI Hentai Generator
AIヘンタイを無料で生成します。

人気の記事

ホットツール

mPDF
mPDF は、UTF-8 でエンコードされた HTML から PDF ファイルを生成できる PHP ライブラリです。オリジナルの作者である Ian Back は、Web サイトから「オンザフライ」で PDF ファイルを出力し、さまざまな言語を処理するために mPDF を作成しました。 HTML2FPDF などのオリジナルのスクリプトよりも遅く、Unicode フォントを使用すると生成されるファイルが大きくなりますが、CSS スタイルなどをサポートし、多くの機能強化が施されています。 RTL (アラビア語とヘブライ語) や CJK (中国語、日本語、韓国語) を含むほぼすべての言語をサポートします。ネストされたブロックレベル要素 (P、DIV など) をサポートします。

SAP NetWeaver Server Adapter for Eclipse
Eclipse を SAP NetWeaver アプリケーション サーバーと統合します。

WebStorm Mac版
便利なJavaScript開発ツール

MinGW - Minimalist GNU for Windows
このプロジェクトは osdn.net/projects/mingw に移行中です。引き続きそこでフォローしていただけます。 MinGW: GNU Compiler Collection (GCC) のネイティブ Windows ポートであり、ネイティブ Windows アプリケーションを構築するための自由に配布可能なインポート ライブラリとヘッダー ファイルであり、C99 機能をサポートする MSVC ランタイムの拡張機能が含まれています。すべての MinGW ソフトウェアは 64 ビット Windows プラットフォームで実行できます。

VSCode Windows 64 ビットのダウンロード
Microsoft によって発売された無料で強力な IDE エディター
