Skip to content
Advertisement

How to remove at javascript print function

How to remove at Javascript print function? Following is my view page before clicking print button(before fired print function)

enter image description here

View page after clicking print button (after fired print function)

enter image description here

I want to remove link(url) from Edit and delete button which are showing below..

Javascript function

JavaScript

Advertisement

Answer

Easiest way is to add a css class to those and then create a media query for print (if you don’t have it already) and hide them.

For example:

JavaScript

And then in your style file add this:

JavaScript

Of course you can do it by element but you might not want to hide all a tags when printing.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement