how to pass an table row object directly to another html page as url argument?
sample.html
<html>
.....
<tr onclick="callnxtpg(this)">
</tr>
.....
<script>
function callnxtpag(开发者_运维百科obj){
window.location="someotherlocation.html&obj="+obj;
}
</script>
someotherlocation.html
<html>
...
<script>
var obj=returnData(obj);
alert(obj.childNodes[0].innerHTML);
</script>
....
</html>
My question is is it possible to do passing one page's element object to another directly in any way?
You can only pass text within the URL, you won't be able to place an object in there unless that object is a string or numeric. You could use a cookie to save the object and retrieve it on the next page.
No, the query sting only takes string as input...so you cannot put an object in the URL query string
You need to send the table as a string with the query string....
Consider that many browsers and servers have a 4k byte limit on the length of an url. Consider client-side storage an an alternative.
精彩评论