Perl script
Here is the basic perl program that we'll use to get started.
#!/usr/bin/perl
use strict;
use LWP::Simple;
print get('http://google.com');
getprint('http://google.com');
getprint store the document's contents in a file.However, LWP::Simple also provides a function called getstore, which stores the content of a URL in a given file.
getstore('http://google.com', 'google.html');
Sometimes, mirror function only makes sense to store a document if it's been updated.
mirror('http://google.com', 'google.html');
They return the HTTP response code, which in some cases is very useful. These can be checked against constants defined by the library. For example, below we check to see if everything went well:
my $response_code = getprint('http://google.com');print "nOKn" if ($response_code == RC_OK);
Python script
def f(x, y=[]):
y.append(x)
return y
print f(23) # prints: [23]
prinf f(42) # prints: [23, 42]
The second print statement prints [23, 42] because the first call to f altered the default value of y, originally an empty list [], by appending 23 to it. If you want y to be bound to a new empty list object each time f is called with a single argument, use the following style instead:
def f(x, y=None):
if y is None:
y = [] y.append(x)
return y
print f(23) # prints: [23]
prinf f(42) # prints: [42]
Javascript
SCRIPT language="JavaScript"
function open1[]
var open1 =window.open
['http://www.domain.com','','scrollbars=yes,height=600,width=800,resizable=yes'];
function open2
var open2 =window.open['http://www.domain.com','','scrollbars=yes,height=600,width=800,resizable=yes'];
function open3[]
var open3 =window.open['http://www.domain.com','','scrollbars=yes,height=600,width=800,resizable=yes'];
/SCRIPT
(This script has been changed to appear on this blog)
This script allows user can open multiwindow
Javascript is the script runs in clients. The first step to check all client forms to correct before send to server.
Reference:
http://www.devshed.com/
http://www.pcw.co.uk/personal-computer-world/features/2246064/debug-javascript-code-free
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment