Let’s say the dominance with the JavaScript
with the login form is seusite.com
.
Create a javascript file: seusite.com/formulario.js
function loginMeuSite() {
var divLoginSite = document.getElementById("divLoginSite");
divLoginSite.innerHTML = '<form action="http://www.xx.com.br/logar.php"><input type="text" name="login"><input type="text" name="senha"><input type="submit" value="Logar"></form>';
}
document.addEventListener("DOMContentLoaded", function(event) { loginMeuSite(); });
Ask your customers to enter the following javascript preferably between tags <head></head>
:
<script src="http://seusite.com/formulario.js" type="text/javascript"></script>
And ask them to insert the <div>
of the login form on local desired where the login form should appear:
<div id="divLoginSite"></div>
Example
sitedocliente.com/cliente.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Incluindo JS</title>
<link rel="stylesheet" href="">
<script src="http://seusite.com/formulario.js" type="text/javascript">
</head>
<body>
<table>
<caption>Tabela 1</caption>
<thead>
<tr>
<th>header</th>
</tr>
</thead>
<tbody>
<tr>
<td>data</td>
</tr>
</tbody>
</table>
<div id="divLoginSite"></div>
</body>
</html>
Perfect solved my problem.....
– Fabio Henrique