Skip to content

Instantly share code, notes, and snippets.

@tav
Created July 3, 2009 17:36
Show Gist options
  • Select an option

  • Save tav/140238 to your computer and use it in GitHub Desktop.

Select an option

Save tav/140238 to your computer and use it in GitHub Desktop.
<script type="text/python">
def dom_from_python(s):
document.getElementById('name').innerHTML = s
def foo():
return u'tav'
</script>
<div>
Hello
<div id="name">
</div>
</div>
<div>
<a href="#" onclick="dom_from_python(foo())">Blah</a>
</div>
<script>
dom_from_python("world")
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment