HTML: Difference between revisions

From Network Security Wiki
Content added Content deleted
No edit summary
No edit summary
Line 48: Line 48:


*Adding Datalist for default options:
*Adding Datalist for default options:
<pre>
<div>
<div>
<lable for="ProductVersion">Product Version </lable>
<lable for="ProductVersion">Product Version </lable>
<input type="text" name="ProductVersion" id="ProductVersion" placeholder="My Product Version" pattern=".{3,}" required title="What is the Product Version" list="defaultProduct">
<input type="text" name="ProductVersion" id="ProductVersion" placeholder="My Product Version" list="defaultProduct">
<datalist id="defaultProduct">
<datalist id="defaultProduct">
<option value="Version 1">
<option value="Version 1">
Line 56: Line 57:
</datalist>
</datalist>
</div>
</div>
</pre>

*Input at least 3 characters:
<pre>
<div>
<lable for="Geo">Account Country</lable>
<input type="text" name="Geo" id="Geo" placeholder="Customer's Country" pattern=".{3,}" required title="Enter Country Name">
</div>
</pre>

Revision as of 21:22, 1 September 2017

  • CSS Link file:
   <link rel="stylesheet" type="text/css" href="index.css">
  • Rediect to another page after submit action:
   <form action="result.php" method="post" id="codered" runat="vdaemon">
  • Apply Regex to input:

Here only 8 numbers input can be entered
It should start from 7, ex:

7xxxxxxx
71234456
    <div>
         <lable for="sr">SR Number</lable>
         <input type="text" name="sr" id="SR" placeholder="SR#" maxlength="8" pattern="[7][0-9]{7,}" required title="Enter a valid Case Number">
    </div>
  • Code not sure:
          <input type="hidden" name="formID" value="srinfo" />
          <input type="hidden" name="redirect_to" value="view.php" />
  • Send Email Link:
<a href="mailto:Amandeep Singh<aman@test.com>?Subject=Application%20Issue%20Report&body=Hi,%0D%0A%0D%0APlease find the below Test application issue report:&cc=Sender2 <sender2@test.com>" target="_top">Here</a>
  • Adding Logo:
<header>
<h1>
<img src="logo.png" alt="logo" align="right" height="40" width="120"/>
Test Application
</h1>
</header>
  • Permitting email from a specific domain only:
            <div>
                <lable for="email">Engineer Email</lable>
                <input type="text" name="email" id="email" placeholder="username@domain.com" maxLength="64" pattern=".+@domain.com" required title="Please enter a valid Email ID">
            </div>
  • Adding Datalist for default options:
           <div>
                <lable for="ProductVersion">Product Version </lable>
                <input type="text" name="ProductVersion" id="ProductVersion" placeholder="My Product Version" list="defaultProduct">
                <datalist id="defaultProduct">
                    <option value="Version 1">
                    <option value="Version 2">
                </datalist>
            </div>
  • Input at least 3 characters:
            <div>
                <lable for="Geo">Account Country</lable>
                <input type="text" name="Geo" id="Geo" placeholder="Customer's Country" pattern=".{3,}" required title="Enter Country Name">
            </div>