Useful codes for web page creation

Useful codes for web page creation
<br />How can I remove the scroll bar on the right side of the homepage?
<body scroll="no">
<body style="overflow-y:hidden">
********************************
How to disable page caching? That is, every time you open a page, you don't call something in the cache.
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
********************************
How to ignore the right button?
<body oncontextmenu="return false">
********************************
How to control the CSS properties of different links on the same page?
a:active{}
a:link{}
a:visited{}
a.1:active{}
a.1:link{}
a.1:visited{}
Define a new tag in DW's CSS. According to HTML syntax, the hyperlink should be
A.YOURS:LINK A.YOURS:HOVER
YOURS can be changed to your own word and then after selecting a link, click YOURS in the CSS panel.
You can define N marks and N mouse OVER effects as needed.
********************************
Email processing submission form
<form name="form1" method="post" action="mailto:[email protected]" enctype="text/plain">
<input type=submit>
</form>
********************************
Is it possible to use a layer to cover the FLASH?
1. Add <param name="wmode" value="transparent"> to the flash parameters
2. <body onblur=self.focus()>
********************************
How to call the corresponding page according to the screen resolution?
onclick=alert("Your display resolution is:" screen.width "×" screen.height)
First make several pages, for example, one htm1.htm is 800*600, one htm2.htm is 1024*768, then judge in your entry page index.htm:
<html>
<head>
<script language=javascript>
<!--
function mHref() {
if (screen.width == 1024) location.href = "htm2.htm";
else if (screen.width == 800) location.href = "htm1.htm";
else return(false);
}
//-->
</script>
</head>
<body onload="mHref();">
</body>
</html>
********************************
How to pop up a window with only the status bar?
<html>
<head>
<title>open() close()</title>
<script language="javascript" type="text/javascript">
<!--
function openWin()
{
var newWin=open("","","menubar=1,height=200");
newWin.document.write("<form>");
newWin.document.write("Click the following button to close the window: <p>");
newWin.document.write("<input type=button value='Close' onclick=window.close()>");
newWin.document.write("</form>");
}
</script></head>
<body>
<div align=center>
<h2>Click the following button to display a new window...</h2>
<form name=form1>
<input type=button value="New window 1[show only address bar]" onclick=window.open('','new1','location=1')>
<input type=button value="New window 2[only show status bar]" onclick=window.open('','','status=1')>
<input type=button value="New window 3 [only show toolbar]" onclick=window.open('','new2','toolbar=1,height=200,width=450')>
<input type=button value="New window 4[show only menu bar]" onclick=openWin()>
<input type=button value="New window 5 [no less than one]" onclick=window.open('','new5')>
<input type=button value="New window 6 [Single but adjustable size]" onclick=window.open('https://www.jb51.net/forumdisplay.php?forumid=32#thread','new6','resizable=1')>
</form>
</div>
</body>
</html>
Previous Page 1 2 3 Next Page Read More

<<:  Navicat for MySQL 15 Registration and Activation Detailed Tutorial

>>:  Docker uses Supervisor to manage process operations

Recommend

Detailed tutorial on MySql installation and uninstallation

This article shares the tutorial of MySql install...

Detailed explanation of the use of CSS pointer-events attribute

In front-end development, we are in direct contac...

Detailed steps to delete environment variables in Linux

How to delete environment variables in Linux? Use...

Press Enter to automatically submit the form. Unexpected discovery

Copy code The code is as follows: <!DOCTYPE ht...

About MySQL 8.0.13 zip package installation method

MySQL 8.0.13 has a data folder by default. This f...

vue3 custom directive details

Table of contents 1. Registering custom instructi...

Detailed explanation of the steps to create a web server with node.js

Preface It is very simple to create a server in n...

How to click on the a tag to pop up the input file upload dialog box

html Copy code The code is as follows: <SPAN cl...

How to prevent hyperlink redirection using JavaScript (multiple ways of writing)

Through JavaScript, we can prevent hyperlinks fro...