Change the html value inside the script

hi , may i know it is possible to change the value inside the postscript for the “id = splitInd”
i want to update the value if the text is match with “123”
image

Hi @john717,

In case you would like to change the value of the attribute “value” you can use a Post Pagination script, such as:

Name: Example
Selector #splitInd

var strValue = results.attr("value");

/* We use "===" instead of "==" because results.attr() returns a object
 * ("null") when the attribute 'value' does not exist. */
if (strValue === "123") {
	// Add your JavaScript code here...
	//results.attr("value", "Hello World!");
}

In case you would like to change the inner HTML of the span element #splitInd then you can use a Post Pagination script, such as:

Name: Example
Selector #splitInd

var strValue = results.html().trim();

/* We use "==" instead of "===" because results.html() always
 * returns a string. */
if (strValue == "123") {
	// Add your JavaScript code here...
	// results.html("Hello World!");
}