> For the complete documentation index, see [llms.txt](https://javascriptuse.gitbook.io/advanced/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://javascriptuse.gitbook.io/advanced/attribute-starts-with-selector-name-value-ok.md).

# Attribute Starts With Selector \[name^="value"] (ok)

https\://api.jquery.com/attribute-starts-with-selector/

C:\xampp82\htdocs\wp3\wp-content\themes\twentytwentyfour\functions.php

```
function wpdocs_selectively_enqueue_admin_script()
{
	wp_enqueue_script('admin_custom_style', get_stylesheet_directory_uri() . '/assets/js/back-custom.js', array(), '0.1.0', 'all');
}
add_action('admin_enqueue_scripts', 'wpdocs_selectively_enqueue_admin_script');
```

C:\xampp82\htdocs\wp3\wp-content\themes\twentytwentyfour\assets\js\back-custom.js

```
jQuery(document).ready(function ($) {
  var valkeywords = $( "input[id^='saswp_medicalwebpage_keywords']" ).val();
  if(!valkeywords) {
    var valname = $( "input[id^='saswp_medicalwebpage_name']" ).val();
    $( "input[id^='saswp_medicalwebpage_keywords']" ).val(valname);
  }
});
```
