title: python: sending a post request with onclick triggering a javascript
body: <p>I'm trying to write a script to search all the published papers of a given scholar. Basically, I'm using python's Requests to send a POST request with some parameters(like searching options and the scholar's name). And I found I'm mainly dealing with a form like this(truncated and edited for simplicity):</p>
  
  <pre><code>&lt;form name="searchForm" 
    method="post" 
    action="http://epub.cnki.net/kns/brief/default_result.aspx" 
    id="searchForm" autocomplete="off" onsubmit="collectSelectDB();"&gt;
      ...
      &lt;div class="research"&gt;
          &lt;span class="reopt" id="typeSelect"&gt;
              &lt;select id="txt_1_sel" name="txt_1_sel" class="searchw8"&gt;
              &lt;option value="AU$=|" selected="true"&gt;Author&lt;/option&gt;
              ...              
          &lt;/span&gt;          
          &lt;input class="rekeyword" value="" id="txt_1_value1" name="txt_1_value1" ...&gt;
          &lt;input type="button" id="btnSearch" class="researchbtn" 
                 onclick="javascript: cnkiIndexSearchOnclick('&amp;amp;ua=1.11');"&gt;
      &lt;/div&gt;
  ...
  </code></pre>
  
  <p></p>
  
  <p>One thing I'm not sure is the "button", which seems to trigger a javascript by a click(and later it produces a result page). </p>
  
  <p>When I pass the parameters like this,</p>
  
  <pre><code>#-*- coding: utf-8 -*-
  import requests
  
  url = 'http://epub.cnki.net/kns/brief/default_restult.aspx'
  name = u'李强'
  payload = {'txt_1_value1' : name.encode('utf-8')}
  r = requests.post(url, params = payload)
  with open("results.html", "w") as f:
      f.write(r.content)
  </code></pre>
  
  <p>it just gives me an empty search result, and a search box filled with the author's name. I guess I'm not sending the POST request properly because of the "button" stuff. Is this also a kind of parameter? How can we deal with it?</p>