Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Python by wow ( 17 years ago )
def random_color() :
    a = str(random.randint(1, 9))
    b = str(random.randint(1, 9))
    c = str(random.randint(1, 9))
    return '#' + a + b + c + a + b + c

print("Content-type: text/html
")

print("<html>")
print("<body>")
print("<head>")
print('<script type="text/javascript">')

print(
'''                                                                                                                                         
nice = function(obj) {                                                                                                                      
    obj.style.width = "100px";                                                                                                              
}                                                                                                                                           
''')

print('</script>')
print("</head>")
print("<table border=1>")

for k in range(100) :
    print("<tr>")
    for j in range(10) :
        color = random_color()
        print('<td style="color:' + color + '";" onclick="nice(this)">')
        print(color)
        print("</td>")
    print("</tr>")
print("</table>");

 

Revise this Paste

Your Name: Code Language: