Greasy Fork is available in English.

議論 » 開発

How to make a greasemonkey script to automatically set seacrh field value to particular value?

§
投稿日: 2016/01/13

How to make a greasemonkey script to automatically set seacrh field value to particular value?

This is my code, which is not working:

var id=document.getElementById["thesearchbox"].value;

if(id==="") {

if(confirm("wanna search for fifa 16 crack?"))
{
    document.getElementById["thesearchbox"].value="fifa 16 crack";
}

}

Here thesearchbox is the id of search field.

§
投稿日: 2016/01/14

replace ["thesearchbox"] by ("thesearchbox")

§
投稿日: 2016/01/14

thanks it worked.

返信を投稿

返信を投稿するにはログインしてください。