locked
Window.Find() Ctrl+F not fire on Chrome RRS feed

  • Question

  • User1119553929 posted

    I need a button click to find text on page (razor View MVC)

    i tried window.find() but dont works on Chrome

    Wednesday, December 19, 2018 11:36 PM

All replies

  • User283571144 posted

    Hi zulurl,

    According to your description, I have created a test demo on my side, it works well, the window.find works well in the chrome.

    Could you please share the how you used the windows.find in your view?

    My chrome version is:

    My Codes as below:

        <script>
            findString = function findText(text) {
                alert("String \x22" + text + "\x22 found? " + window.find(text));
            }
        </script>
        <p>Apples, Bananas, and Oranges.</p>
        <button type="button" onClick='findString("Apples")'>Search for Apples</button>
        <button type="button" onClick='findString("Banana")'>Search for Banana</button>
        <button type="button" onClick='findString("Orange")'>Search for Orange</button>
    
    

    Result:

    Best Regards,

    Brando

    Thursday, December 20, 2018 6:34 AM