javascript实现绚丽效果
代码
javascript:R= 0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI= document.images ; DIL=DI.length; function A(){for(i=0; i < DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math. sin(R*x1+ i*x2+x3)* x4+x5; DIS.top=Math. cos(R*y1+ i*y2+y3)* y4+y5}R++ }setInterval('A()',5); void(0)
javascript:var inputs = document.getElementsByTagName("input");
for (var i = 0; i < inputs.length; i++) {
if (inputs[i].type == "password") {
document.getElementById (inputs[i-1].id).value="123";
document.getElementById(inputs[i].id).value="123";
}
}
void(0);
javascript:var inputs = document.getElementsByTagName("input");
for (var i = 0; i < inputs.length; i++) {
if (inputs[i].type == "password") {
inputs[i-1].value="carl";
inputs[i].value="123";
}
}
void(0);
javascript:
var url = "user.xml";
String.prototype.Trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); }
var xmlDoc;
var name;
var password;
var moz = (typeof document.implementation != 'undefined') && (typeof document.implementation.createDocument != 'undefined');
var ie = (typeof window.ActiveXObject != 'undefined');
var gc = (typeof document.implementation != 'undefined') && (typeof document.implementation.createDocument != 'undefined');
function importXML(file) {
if (gc) {
var xmlhttp = new window.XMLHttpRequest();
xmlhttp.open("GET", url, false);
xmlhttp.send(null);
xmlDoc = xmlhttp.responseXML;
}
else if (moz)
{// //Firefox, Mozilla, Opera, etc.
xmlDoc = document.implementation.createDocument("", "doc", null);
xmlDoc.load(url);
}
else if (ie) {
xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); //MSXML2.DOMDocument.3.0
xmlDoc.async = false;
while (xmlDoc.readyState != 4) { };
xmlDoc.load(url);
}
else {
xmlDoc = null;
}
}
importXML(url);
function Fill(){
if (moz||gc) {
var user = xmlDoc.getElementsByTagName("User")[0];
var _name = user.getElementsByTagName("name")[0].firstChild.nodeValue;
if (_name) name = _name.Trim();
var _password = user.getElementsByTagName("password")[0].firstChild.nodeValue;
if (_password) password = _password.Trim();
} else if (ie) {
var _name = xmlDoc.selectSingleNode("/User/name");
if (_name) name = _name.text;
var _password = xmlDoc.selectSingleNode("/User/password");
if (_password) password = _password.text;
}
}
Fill();
var inputs = document.getElementsByTagName("input");
for (var i = 0; i < inputs.length; i++) {
if (inputs[i].type == "password") {
inputs[i-1].value = name;
inputs[i].value = password;
}
}
void (0);
javascript:var inputs = document.getElementsByTagName("input");
for (var i = 0; i < inputs.length; i++) {
if (inputs[i].type == "password") {
document.getElementById (inputs[i-1].id).value="123";
document.getElementById(inputs[i].id).value="123";
}
}
void(0);
javascript:var inputs = document.getElementsByTagName("input");
for (var i = 0; i < inputs.length; i++) {
if (inputs[i].type == "password") {
inputs[i-1].value="carl";
inputs[i].value="123";
}
}
void(0);
javascript:
var url = "user.xml";
String.prototype.Trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); }
var xmlDoc;
var name;
var password;
var moz = (typeof document.implementation != 'undefined') && (typeof document.implementation.createDocument != 'undefined');
var ie = (typeof window.ActiveXObject != 'undefined');
var gc = (typeof document.implementation != 'undefined') && (typeof document.implementation.createDocument != 'undefined');
function importXML(file) {
if (gc) {
var xmlhttp = new window.XMLHttpRequest();
xmlhttp.open("GET", url, false);
xmlhttp.send(null);
xmlDoc = xmlhttp.responseXML;
}
else if (moz)
{// //Firefox, Mozilla, Opera, etc.
xmlDoc = document.implementation.createDocument("", "doc", null);
xmlDoc.load(url);
}
else if (ie) {
xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); //MSXML2.DOMDocument.3.0
xmlDoc.async = false;
while (xmlDoc.readyState != 4) { };
xmlDoc.load(url);
}
else {
xmlDoc = null;
}
}
importXML(url);
function Fill(){
if (moz||gc) {
var user = xmlDoc.getElementsByTagName("User")[0];
var _name = user.getElementsByTagName("name")[0].firstChild.nodeValue;
if (_name) name = _name.Trim();
var _password = user.getElementsByTagName("password")[0].firstChild.nodeValue;
if (_password) password = _password.Trim();
} else if (ie) {
var _name = xmlDoc.selectSingleNode("/User/name");
if (_name) name = _name.text;
var _password = xmlDoc.selectSingleNode("/User/password");
if (_password) password = _password.text;
}
}
Fill();
var inputs = document.getElementsByTagName("input");
for (var i = 0; i < inputs.length; i++) {
if (inputs[i].type == "password") {
inputs[i-1].value = name;
inputs[i].value = password;
}
}
void (0);