Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 5th, 2012  |  syntax: None  |  size: 1.64 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Percentage sign not working
  2. <table width="90%">
  3. <tr>
  4. <td width="60%">HELLO</td>
  5. <td width="40%">GOOD BYE</td>
  6. </tr>
  7. </table>
  8.  
  9. <input type="button" value="BUTTON" onclick="function(%s)" /> ''' % variable
  10.        
  11. '''
  12.  
  13. ....
  14. <table width="90%%">
  15. <tr>
  16. <td width="60%%">HELLO</td>
  17. <td width="40%%">GOOD BYE</td>
  18. </tr>
  19. </table>
  20.  
  21. <input type="button" value="BUTTON" onclick="function(%s)" /> ''' % variable
  22.        
  23. s = '''<table width="90%">                                                                                
  24. <tr>                                                                                                                                                                                                              
  25. <td width="60%">HELLO</td>                                                                                                                                                                                        
  26. <td width="40%">GOOD BYE</td>                                                                                                                                                                                      
  27. </tr>                                                                                                                                                                                                              
  28. </table>                                                                                                                                                                                                          
  29.  <input type="button" value="BUTTON" onclick="function({funcarg})" /> '''
  30.  
  31. s.format(**{'funcarg': 'return'})