I have inserted into my Home.aspx a list with Web-Parts like this:

enter image description here

Now I want to know how can I apply JavaScript to this list?

Note: I want to display an image depending of selected of one field

有帮助吗?

解决方案

You can apply JavaScript to your list by using Script Editor Web-part(SEWP)

enter image description here

Step 1: Edit the list page from top right gear/edit page.

Step 2: Add new web part and add a Script Editor to the page, under Media and Content.

Step 3: Add your JavaScript code.

其他提示

Your screenshot looks like the Classic view. For this view you can use Client Side Rendering (JS Link) either for the field itself or for a List View Web Part (on a classic page).

In a modern view, you'll need to use a SharePoint Framework Field Customizer. However, these are still in preview and likely won't be available outside of developer tenants until the end of September or later.

许可以下: CC-BY-SA归因
scroll top