jquery how to change dom properties on different webpages?
i have 2 webpages: xxx.com\index.php
and xxx.com\test.php
what i am trying to accomplish is when i click a button on index.php
something to change on the test.php
, maybe something like:
$('input#submit').click(function() {
$('.online_sent'). show();
});
开发者_JAVA百科
where input#submit
in on index.php
and .online_sent
in on test.php
i'm not using iframes, they are just 2 webpages, more exactly 2 sub-webpages on the same domain
You'll need to use something like node.js.
When a user clicks on the button you send something to node.js, then it'll send an update. On test.php have a listener that listen's for this button click and changes the page to correspond with the new state.
what you are trying to do is not cool, I mean change a different file. I suggest you to put "variant part" into database. Then apply changes to database from index.php, detect changes from test.php
精彩评论