»
Tiếng AnhTiếng PhápTiếng Việt

In - Tạo một cửa sổ - JavaScriptBank.com

Phiên bản đầy đủ: jsB@nk » Trình duyệt » Tạo một cửa sổ
URL: https://www.javascriptbank.com/make-new-window.html

Tạo một cửa sổ © JavaScriptBank.comHiệu ứng sẽ tạo một cửa sổ mới với các thông số về chữ, màu nền, hiệu ứng... do bạn chọn lựa.

Phiên bản đầy đủ: jsB@nk » Trình duyệt » Tạo một cửa sổ
URL: https://www.javascriptbank.com/make-new-window.html



JavaScript
<script language="javascript">function fun(F){var X="/script";var nam=F.N.value.toUpperCase(),i,N1,N2,N3,F1,F2,F3,F4myWin=open("","","width=400,height=300,status=yes,toolbar=no,menubar=yes,scrollbar=yes");myWin.document.open();myWin.document.write("<html><script language="+"javascript"+">");myWin.document.write("function C(){close()}");myWin.document.write("<"+X+">");myWin.document.write("<body bgcolor="+F.BGC.value+"><u><center><font color="+F.N1.value+" size="+F.N3.value+"><"+F.N2.value+">"+"This is the page of&nbsp&nbsp"+nam+"<br></font></"+F.N2.value+"></u></center>");myWin.document.write("<font color="+F.F1.value+" size="+F.F2.value+"><"+F.F3.value+"><"+F.F4.value+">"+F.F.value+"</"+F.F3.value+"></"+F.F4.value+"><br>");myWin.document.write("<font color="+F.S1.value+" size="+F.S2.value+"><"+F.S3.value+"><"+F.S4.value+">"+F.S.value+"</"+F.S3.value+"></"+F.S4.value+"><br>");myWin.document.write("<font color="+F.T1.value+" size="+F.T2.value+"><"+F.T3.value+"><"+F.T4.value+">"+F.T.value+"</"+F.T3.value+"></"+F.T4.value+"><br>");myWin.document.write("<font color="+F.C1.value+" size="+F.C2.value+"><"+F.C3.value+"><"+F.C4.value+">"+F.C.value+"</"+F.C3.value+"></"+F.C4.value+"><br>");myWin.document.write("<form><input type="+"button "+"value="+"CLOSE_WINDOW"+" onClick="+"C()"+">");myWin.document.write("</form></body></html>");myWin.document.close();}</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form name="ff"><font face="Comic Sans MS" color="#A52A2A" size="4">Fill the columns and select appropriate fonts to create a web page dynamically for you in a new window&nbsp;</font><font color=brown size=2><p>ENTER YOUR NAME :<input type="text" name="N" maxlength=40><font color=green>COLOR:<select name="N1"><option value="black">black<option value="red">red<option value="blue">blue<option value="green">green<option value="white">white</select> EFFECTS:<select name="N2"><option value="r">Regular<option value="b">Bold<option value="i">Italics</select>FONT SIZE:<select name="N3"><option value=2>2<option value=4>4<option value=6>6</select><br></font></p><p><font color=red>TYPE CONTENTS:<br><input type="text" name="F" value="First line" maxlength=40><font color=blue> COLOR:<select name="F1"><option value="red">red<option value="blue">blue<option value="green">green<option value="maroon">maroon<option value="brown">brown</select>FONT SIZE:<select name="F2"><option value=2>2<option value=4>4<option value=6>6</select>EFFECTS:<select name="F3"><option value="r">Regular<option value="b">Bold<option value="i">Italics<option value="u">Underline</select>ALIGN:<select name="F4"><option value="left">left<option value="center">center</select> <br><input type="text" name="S" value="Second line" maxlength=40><font color=blue> COLOR:<select name="S1"><option value="red">red<option value="blue">blue<option value="green">green<option value="maroon">maroon<option value="brown">brown</select>FONT SIZE:<select name="S2"><option value=2>2<option value=4>4<option value=6>6</select>EFFECTS:<select name="S3"><option value="r">Regular<option value="b">Bold<option value="i">Italics<option value="u">Underline</select>ALIGN:<select name="S4"><option value="left">left<option value="center">center</select> <br><input type="text" name="T" value="Third line" maxlength=40><font color=blue> COLOR:<select name="T1"><option value="red">red<option value="blue">blue<option value="green">green<option value="maroon">maroon<option value="brown">brown</select>FONT SIZE:<select name="T2"><option value=2>2<option value=4>4<option value=6>6</select>EFFECTS:<select name="T3"><option value="r">Regular<option value="b">Bold<option value="i">Italics<option value="u">Underline</select>ALIGN:<select name="T4"><option value="left">left<option value="center">center</select> <br><input type="text" name="C" value="Fourth line" maxlength=40><font color=blue> COLOR:<select name="C1"><option value="red">red<option value="blue">blue<option value="green">green<option value="maroon">maroon<option value="brown">brown</select>FONT SIZE:<select name="C2"><option value=2>2<option value=4>4<option value=6>6</select>EFFECTS:<select name="C3"><option value="r">Regular<option value="b">Bold<option value="i">Italics<option value="u">Underline</select>ALIGN:<select name="C4"><option value="left">left<option value="center">center</select> <br>BODY BACKGROUND COLOR:<select name="BGC"><option value="white">white<option value="violet">violet<option value="orange">orange<option value="yellow">yellow<option value="indigo">indigo<option value="gray">gray<option value="brown">brown<option value="aqua">aqua</select><br><br><input type="button" value=" NEW WINDOW "onClick="fun(ff)"></form><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->