jquery - javascript change element from another page -


i have 2 buttons using javascript.

first creates text , removes link , second creates link , removes text

can click on link change text? when on page @ same time works.

otherwise not.

yes can change text.

any event on html elements can have default action overridden.

having onclick event object should use event.preventdefault() cancel default action.

an example:

document.getelementbyid("my-link-element").addeventlistener("click", function(event) {     event.preventdefault();     // , here change text .. }); 

Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -