简体   繁体   中英

Javascript bookmarklet outputting 'true' in Firefox instead of performing script

We are running a quick javascript function to fill out and save a form to quickly move forward in a workflow (for testing purposes). It's running fine in all browsers except for Firefox - and only on a couple people's machines.

javascript:!function(){$("#ruleDetailForm\\.authorizingStatutes").val("Test")}();

There is more to the script, but the above example results in the same issue. Both copying it into the URL bar or adding it as a bookmarklet results in a blank white page displaying 'true' instead of copying "Test" into the relevant field.

The same users have no issues using other browsers, and other people have had success with it working in Firefox. Firebug doesn't show anything useful, and they are on the most up-to-date version of Firefox.

尝试包裹在空虚中

javascript:void(function(){$("#ruleDetailForm\\.authorizingStatutes").val("Test")}());

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM